CREATE TABLE test
(
DAY_ID VARCHAR2(8 BYTE),
IMSI VARCHAR2(30 BYTE),
HOUR_ID VARCHAR2(10 BYTE),
CELL_ID VARCHAR2(30 BYTE)
)
PARTITION BY LIST (DAY_ID)SUBPARTITION BY LIST (HOUR_ID) (PARTITION P20190101 VALUES ('20190101')(SUBPARTITION P20190101_2019010100 VALUES ('2019010100'));
查询分区
SELECT * FROM USER_TAB_SUBPARTITIONS WHERE TABLE_NAME=TMP_TABLE --查询出该表的所有分区
select * from tablename PARTITION(PARTITION的值); --主分区查询
select * from tablename SUBPARTITION(SUBPARTITION的值); --子分区查询