Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
create table TRFF_APP.DRV_FLOW
(
lsh VARCHAR2(13) not null,
sfzmhm VARCHAR2(18) not null,
dabh CHAR(12),
xm VARCHAR2(30) not null,
ywlx CHAR(1) not null,
ywyy VARCHAR2(8),
kssj DATE,
jssj DATE,
ywgw VARCHAR2(8) not null,
kskm CHAR(6),
xygw CHAR(1) not null,
glbm VARCHAR2(12) not null,
ffbz CHAR(1),
rkbz CHAR(1),
hdbz CHAR(1),
xgzl VARCHAR2(15),
zjcx VARCHAR2(15),
ywzt CHAR(1),
ywblbm VARCHAR2(12),
fzjg VARCHAR2(10)
)
tablespace DT_DRV_DAT
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64
next 1
minextents 1
maxextents unlimited
);
-- Create/Recreate indexes
create index TRFF_APP.IDX_DRV_FLOW_DABH on TRFF_APP.DRV_FLOW (DABH)
tablespace DT_DRV_IDX
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_FFBZ on TRFF_APP.DRV_FLOW (FFBZ)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 136M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_FZJG on TRFF_APP.DRV_FLOW (FZJG)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 160M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_GLBM_XYGW on TRFF_APP.DRV_FLOW (GLBM, XYGW)
tablespace DT_DRV_IDX
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_HDBZ on TRFF_APP.DRV_FLOW (HDBZ)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 112M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_JSSJ on TRFF_APP.DRV_FLOW (JSSJ)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 200M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_KSKM on TRFF_APP.DRV_FLOW (KSKM)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 208M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_KSSJ on TRFF_APP.DRV_FLOW (KSSJ)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 224M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_RKBZ on TRFF_APP.DRV_FLOW (RKBZ)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 120M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_SFZMHM on TRFF_APP.DRV_FLOW (SFZMHM)
tablespace DT_DRV_IDX
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_XGZL on TRFF_APP.DRV_FLOW (XGZL)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 144M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_XM on TRFF_APP.DRV_FLOW (XM)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 192M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_XYGW on TRFF_APP.DRV_FLOW (XYGW)
tablespace DT_DRV_IDX
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_YWBLBM on TRFF_APP.DRV_FLOW (YWBLBM)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 264M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_YWGW on TRFF_APP.DRV_FLOW (YWGW)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 160M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_YWLX on TRFF_APP.DRV_FLOW (YWLX)
tablespace DT_DRV_IDX
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_YWYY on TRFF_APP.DRV_FLOW (YWYY)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 88M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_YWZT on TRFF_APP.DRV_FLOW (YWZT)
tablespace DRV_INDEX1
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 136M
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_DRV_FLOW_ZJCX on TRFF_APP.DRV_FLOW (ZJCX)
tablespace DT_DRV_IDX
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
create index TRFF_APP.IDX_FLOW_XYGW_YWBLBM on TRFF_APP.DRV_FLOW (XYGW, YWBLBM)
tablespace DT_DRV_IDX
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table TRFF_APP.DRV_FLOW
add constraint PK_DRV_FLOW primary key (LSH)
using index
tablespace DT_DRV_IDX
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);