当前位置:Gxlcms > 数据库问题 > Oracle 创建表分区

Oracle 创建表分区

时间:2021-07-01 10:21:17 帮助过:13人阅读

create table TableName1
(
id CHAR(36) not null,
samplingdate TIMESTAMP(6) not null,
instantaneousflow NUMBER(10,3),
totalflow NUMBER(10),
flowmeterid CHAR(36) not null,
receivetime TIMESTAMP(6),
inserttime TIMESTAMP(6)
);
partition by range (SAMPLINGDATE)
INTERVAL ( NUMTOYMINTERVAL (1, ‘YEAR‘) ) --Oracle 11g支持 , Oracle会根据数据自动按照年份创建分区
(
partition P2012 values less than (TIMESTAMP‘ 2012-01-01 00:00:00‘)
tablespace WIMS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
)
);

Oracle 创建表分区

标签:tab   数据   ace   ctf   rtti   date   mit   创建   tran   

人气教程排行