TRUNCATE TABLE v16

Use the TRUNCATE TABLE command to remove the contents of a table while preserving the table definition. Truncating a table also truncates the table's partitions or subpartitions. The syntax is:

TRUNCATE TABLE <table_name>

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. Deleting a table deletes any partitions or subpartitions of that table.

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