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

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

语法格式

  • 清理表数据。
    12
    TRUNCATE [ TABLE ] [ ONLY ] {table_name [ * ]} [, ... ]    [ CONTINUE IDENTITY ] [ CASCADE | RESTRICT ] [ PURGE ];

  • 清理表分区的数据。
    12345
    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/distributed-devg-v8-gaussdb/gaussdb-12-0694.html