1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| create table t_part_1
( col1 date
, col2 number(10)
)
partition by range (col1)
( partition p2015 values less than (to_date('2016-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss'))
, partition p2016 values less than (to_date('2017-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss'))
, partition p2017 values less than (to_date('2018-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss'))
);
create table t_part_2
( col1 date
, col2 number(10)
)
partition by range (col1)
( partition p2016092500 values less than (to_date('2016-09-25 01:00:00', 'yyyy-mm-dd hh24:mi:ss'))
, partition p2016092501 values less than (to_date('2016-09-25 02:00:00', 'yyyy-mm-dd hh24:mi:ss'))
, partition p2016092502 values less than (to_date('2016-09-25 03:00:00', 'yyyy-mm-dd hh24:mi:ss'))
, partition p2016092503 values less than (to_date('2016-09-25 04:00:00', 'yyyy-mm-dd hh24:mi:ss'))
, partition p2016092504 values less than (to_date('2016-09-25 05:00:00', 'yyyy-mm-dd hh24:mi:ss'))
, partition p2016092505 values less than (to_date('2016-09-25 06:00:00', 'yyyy-mm-dd hh24:mi:ss'))
, partition p2016092506 values less than (to_date('2016-09-25 07:00:00', 'yyyy-mm-dd hh24:mi:ss'))
); |
Partager