– Create table
create table xxx
(
f1 VARCHAR2(12) not null,
f2 VARCHAR2(8) not null,
sjjcpch VARCHAR2(20),
sjjcsj DATE
)
partition by list (f2)
(
partition P201701 values (‘201701’)
tablespace txx
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
),
partition P_OTHER values (DEFAULT)
tablespace txx
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
)
);
– Add comments to the table
comment on table xxx
is ‘xxx’;
– Add comments to the columns
comment on column xxx.f1
is ‘f1’;
comment on column xxx.sjjcpch
is ‘数据集成批次号’;
comment on column xxx.sjjcsj
is ‘数据集成时间’;
– Create/Recreate indexes
create index i_xxx on xxx (f2)
【ORACLE】创建表-主键分区索引
最新推荐文章于 2022-08-21 17:52:56 发布