Partitioning Syntax error alter table

2019-09-19 05:18发布

I am trying to add partitions to my table. Used this syntax

ALTER TABLE report_datanew6 PARTITION BY RANGE ( UNIX_TIMESTAMP(timestamp) ) (
PARTITION p0 VALUES LESS THAN ( UNIX_TIMESTAMP('2014-05-06') ),
PARTITION p1 VALUES LESS THAN ( UNIX_TIMESTAMP('2014-05-07') ),
PARTITION p2 VALUES LESS THAN ( UNIX_TIMESTAMP('2014-05-08') ),
PARTITION p3 VALUES LESS THAN( MAXVALUE)
);

It gives me a syntax error at line1.

Error : [Err] 1486 - Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed

0条回答
登录 后发表回答