ITPub博客

首页 > Linux操作系统 > Linux操作系统 > partitioned by timestamp datatype

partitioned by timestamp datatype

原创 Linux操作系统 作者:zhouwf0726 时间:2019-02-17 12:00:04 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2006-02-22

  • 博文量
    458
  • 访问量
    342016