TRUNCATE¶
TRUNCATE
removes all rows from a table.
It is functionally identical to running a DELETE
statement without a WHERE
clause.
Permissions¶
The role must have the DELETE
permission at the table level.
Syntax¶
truncate_table_statement ::=
TRUNCATE [ TABLE ] [schema_name.]table_name
[ RESTART IDENTITY | CONTINUE IDENTITY ]
;
table_name ::= identifier
schema_name ::= identifier
Parameters¶
Parameter |
Description |
---|---|
|
The name of the schema for the table. |
|
The name of the table to truncate. |
|
Automatically restart sequences owned by columns of the truncated table. |
|
Do not change the values of sequences. This is the default. |