TRUNCATE

Description

Statement use to quickly removes all rows from a table or set of tables.

Click here to navigate to the Greenplum documentation page for this syntax.

Grammar Syntax

TRUNCATE [TABLE] [ONLY] <name> [ * ] [, ...] 
    [ RESTART IDENTITY | CONTINUE IDENTITY ] [CASCADE | RESTRICT]

Overrided behavior for Greenplum

Use RESTRICTED for tables

Same behavior for the truncate, [RESTRICT] option has no effect on Greenplum.

TRUNCATE mytable RESTRICT;

TRUNCATE table_with_identity RESTRICT;

For more information about this statement check the PostgreSQL TRUNCATE statement

Last updated