云数据库 GaussDB-CREATE TABLE PARTITION AS:语法格式

时间:2025-01-26 10:48:33

语法格式

 1 2 3 4 5 6 7 8 91011
CREATE  TABLE [ IF NOT EXISTS ] partition_table_name    [ (column_name [, ...] ) ]    [ { ENGINE [ = ] { InnoDB | 'InnoDB' | "InnoDB" } } [ [ , ] ... ] ]    [ WITH ( {storage_parameter = value} [, ... ] ) ]    [ ILM ADD POLICY ROW STORE COMPRESS ADVANCED ROW AFTER n { day | month | year } OF NO MODIFICATION [ ON ( EXPR )]]    [ TABLESPACE tablespace_name ]    [ DISTRIBUTE BY { REPLICATION | { [HASH ] ( column_name ) } } ]    [ TO { GROUP groupname | NODE ( nodename [, ... ] ) } ]    PARTITION BY partition_clause partition_definition_list    AS query    [ WITH [ NO ] DATA ];

各个字段详细信息请参见语法格式

support.huaweicloud.com/distributed-devg-v8-gaussdb/gaussdb-12-1745.html