我用原SQL脚本生产一张表的脚本如下:
create table sanny_goods(
code varchar2(100) constraint NN_sannygoods_code not null,
name varchar2(100),
price binary_double,
total number,
constraint PK_SANNYGOODS_CODE primary key(code) using index tablespace sanny_index
);
comment on table sanny_goods is '商品表';
comment on column sanny_goods.code is '商品编码';
comment on column sanny_goods.name is '商品名称';
comment on column sanny_goods.price is '商品价格';
comment on column sanny_goods.total is '商品库存';成功生成了一张表,然后用PL\SQL DEVELOPER导出用户对象,生成这样的脚本:
create table SANNY_GOODS
(
  CODE  VARCHAR2(100),
  NAME  VARCHAR2(100),
  PRICE BINARY_DOUBLE,
  TOTAL NUMBER
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
comment on table SANNY_GOODS
  is '商品表';
comment on column SANNY_GOODS.CODE
  is '商品编码';
comment on column SANNY_GOODS.NAME
  is '商品名称';
comment on column SANNY_GOODS.PRICE
  is '商品价格';
comment on column SANNY_GOODS.TOTAL
  is '商品库存';
alter table SANNY_GOODS
  add constraint PK_SANNYGOODS_CODE primary key (CODE)
  using index 
  tablespace SANNY_INDEX
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
alter table SANNY_GOODS
  add constraint NN_SANNYGOODS_CODE
  check ("CODE" IS NOT NULL);现在我需要做的是,通过JAVA+Ibatis做一个小小的解析程序,使得能生成符合我自己写的脚本规范的脚本,能做到吗?谢谢~~~~~
用DEVLOPER生成的脚本不符合我要遵循的规范,大家给个思路呢,谢谢