TRUNCATE TABLE v12
Use the TRUNCATE TABLE
command to remove the contents of a table, while preserving the table definition. When you truncate a table, any partitions or subpartitions of that table are also truncated. The syntax is:
Parameters
table_name
The name (optionally schema-qualified) of the partitioned table.
Description
The TRUNCATE TABLE
command removes an entire table, and the data that resides in that table. When you delete a table, any partitions or subpartitions (of that table) are deleted as well.
To use the TRUNCATE TABLE
command, you must be the owner of the partitioning root, a member of a group that owns the table, the schema owner, or a database superuser.
example_emptying_a_table