partitioned by timestamp datatype

zhouwf0726發表於2019-02-17

CREATE TABLE TEST_PARTITION(
TEST_AAA VARCHAR2(5) NOT NULL,
TEST_BBB VARCHAR2(10) NOT NULL,
TEST_DATE TIMESTAMP NOT NULL
)
PARTITION BY RANGE(TEST_DATE)
(PARTITION test_1 VALUES LESS THAN
(TIMESTAMP '2005-02-01 16:00:00.123456'),
PARTITION test_2 VALUES LESS THAN
(TIMESTAMP '2005-03-01 16:00:00.123456'),
PARTITION test_3 VALUES LESS THAN
(TIMESTAMP '2005-04-01 16:00:00.123456'));


CREATE TABLE TEST_PARTITION(
   TEST_AAA         VARCHAR2(5)    NOT NULL,
   TEST_BBB         VARCHAR2(10)   NOT NULL,
   TEST_DATE        TIMESTAMP      NOT NULL
)
PARTITION BY RANGE(TEST_DATE)
( PARTITION test_1 VALUES LESS THAN
    (TO_DATE('2005/02/01 00:00:00','YYYY/MM/DD HH24:MI:SS')),
 PARTITION test_2 VALUES LESS THAN
    (TO_DATE('2005/03/01 00:00:00','YYYY/MM/DD HH24:MI:SS')),
 PARTITION test_3 VALUES LESS THAN
    (TO_DATE('2005/04/01 00:00:00','YYYY/MM/DD HH24:MI:SS')));

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/756652/viewspace-567089/,如需轉載,請註明出處,否則將追究法律責任。

相關文章