例子




CREATE TABLE T_DPI_FIRSTVISIT_HTTP(


DATE_TAG DATE,


ACC_NBR VARCHAR2(20),


CATEGORY VARCHAR2(200),


SUB_DOMAIN VARCHAR2(1000),


TOTAL_FLOW NUMBER(10),


TOTAL_DURATION NUMBER(10)


)


PARTITION BY RANGE(DATE_TAG)


INTERVAL (numtodsinterval(1,'DAY'))


(


PARTITION part_01 values LESS THAN(TO_DATE('20131226','YYYYMMDD'))


);




查询表分区的信息


SELECT * FROM USER_SEGMENTS;


清空表分区数据:



alter table 表名 truncate partition 分区名;


直接删除分区:


alter table 表名 drop partition分区名;