TRUNCATE — Empty a table.
TRUNCATE removes all rows from a table. It has the same effect as an unqualified
DELETE. However, since it doesn't scan the table, it's faster.
TRUNCATE is most useful on large tables.
DROP STORAGE clause is accepted for compatibility but is ignored.
The name (optionally schema-qualified) of the table to truncate.
You can't use
TRUNCATE if there are foreign-key references to the table from other tables. Checking validity in such cases requires table scans, which
TRUNCATE aims to avoid.
TRUNCATE doesn't run any user-defined
ON DELETE triggers for the table.
This command truncates a table named