数据仓库服务 GAUSSDB(DWS)-TRUNCATE:语法格式

时间:2024-12-24 10:32:41

语法格式

  • 清理表数据。
1
2
TRUNCATE [ TABLE ] [ ONLY ] {[[database_name.]schema_name.]table_name [ * ]} [, ... ]
    [ CONTINUE IDENTITY ] [ CASCADE | RESTRICT ];
  • 清理表分区的数据。
1
2
3
4
5
ALTER TABLE [ IF EXISTS  ] { [ ONLY  ] [[database_name.]schema_name.]table_name  
                           | table_name *  
                           | ONLY ( table_name )  } 
    TRUNCATE PARTITION { partition_name  
                       | FOR (  partition_value  [, ...] )  } ;
support.huaweicloud.com/sqlreference-dws/dws_06_0225.html