云数据库 GAUSSDB-TRUNCATE:语法格式

时间:2024-01-23 20:08:47

语法格式

  • 清理表数据。
1
2
TRUNCATE [ TABLE ] [ ONLY ] {table_name [ * ]} [, ... ]
    [ CONTINUE IDENTITY ] [ CASCADE | RESTRICT ];
  • 清理表分区的数据。
1
2
3
4
5
ALTER TABLE [ IF EXISTS  ] { [ ONLY  ] table_name  
                           | table_name *  
                           | ONLY ( table_name )  } 
    TRUNCATE PARTITION { partition_name  
                       | FOR (  partition_value  [, ...] )  } [ UPDATE GLOBAL INDEX ];
support.huaweicloud.com/devg-v1-gaussdb/gaussdb_devg_0642.html