Create Table orders ( PATIENT_ID varchar2(10) not null, ORDER_NO number(4), ORDER_SUB_NO number(2), .............. ORDER_CLASS char(1), ORDER_TEXT varchar2(80), ORDER_CODE varchar2(10), ............. START_DATE_TIME date STOP_DATE_TIME date ................. ORDERING_DEPT varchar2(8) storage (initial 100M next 1M) PARTITION BY RANGE(START_DATE_TIME) SUBPARTITION BY HASH(ORDER_CODE) SUBPARTITIONS 3 STORE IN (ordersub1, ordersub 2, ordersub 3) (PARTITION orders200212 VALUES LESS THAN (to_date(’2003-01-01 00:00: 00’,’yyyy-mm-dd hh24:mi:ss’)) tablespace Tsp_Orders, PARTITION orders200301 VALUES LESS THAN (to_date(’2003-02-01 00:00: 00’,’yyyy-mm-dd hh24:mi:ss’)) tablespace Tsp_Orders,, PARTITION orders 200302 VALUES LESS THAN (to_date(’2003-03-01 00:00: 00’,’yyyy-mm-dd hh24:mi:ss’)) tablespace Tsp_Orders,, ..................... PARTITION orders200402 VALUES LESS THAN (to_date(’2004-03-01 00:00: 00’,’yyyy-mm-dd hh24:mi:ss’)) tablespace Tsp_Orders (SUBPARTITION ordersub1 TABLESPACE Tsp_Orders, SUBPARTITION ordersub 2 TABLESPACE Tsp_Orders, SUBPARTITION ordersub3 TABLESPACE Tsp_Orders)); |