创建range-list
create table PJGPS_FQ
(
pjgpsid VARCHAR2(36) not null,
fixnumber VARCHAR2(50),
fixtime DATE,
fixx VARCHAR2(20),
fixy VARCHAR2(20),
fixsite VARCHAR2(1000),
inputtime DATE not null,
rcpersonid VARCHAR2(36),
beencheck NUMBER(1) default 0,
dataintype NUMBER(2) default 0,
locatepre VARCHAR2(20),
maybetol VARCHAR2(50),
orifixx VARCHAR2(20) default 0,
orifixy VARCHAR2(20) default 0,
lastfixtime DATE,
invalidmark NUMBER(1) default 0,
isfoul NUMBER(1) default 0,
source NUMBER(22) default 1,
batch NUMBER(22) default 1,
orgcode VARCHAR2(255) not null
)
partition by range (inputtime) subpartition by list(orgcode)
subpartition template (
subpartition sq_441602003 values ('441602003'),
subpartition sq_441602004 values ('441602004')
)
(
partition q_201607 values less than (to_date('2016-08','YYYY-MM')),
partition q_201608 values less than (to_date('2016-09','YYYY-MM'))
);
- 查询是否支持表分区,企业版才行
SELECT VALUE FROM V$OPTION WHERE UPPER(PARAMETER)= 'PARTITIONING ';
- 查询数据库版本
select * from v$version;
网友评论