Clears a table.
TRUNCATE TABLE name [DROP STORAGE]
TRUNCATE command removes all rows from a table. This command has the same effect as an unqualified
DELETE command. However, the TRUNCATE command is faster because it does not scan the table.
This is most useful for large tables.
DROP STORAGE clause is used for compatibility, but is ignored.
|name||The name of the table to be truncated. The name can be schema-qualified.|
If other tables have foreign-key references to the table to be truncated, you cannot
TRUNCATE command. This is because table scans are required for validity check.
TRUNCATE command does not run user-defined
DELETE triggers for the table even if you have configured such triggers.
Run the following command to truncate the bigtable table:
TRUNCATE TABLE bigtable;