| TRUNCATE |
TRUNCATE {TABLE [schema.]table [{PRESERVE | PURGE} SNAPSHOT LOG] |
CLUSTER [schema.]cluster
}
[{DROP | REUSE} STORAGE]
|
Removes all rows from a table or cluster.
|
Keywords
table
Specifies the name of the table from which rows are to be removed.
cluster
Specifies the name of the cluster from which rows are to be removed.
PRESERVE SNAPSHOT LOG
Specifies that existing snapshot logs on this table should be preserved when the table is truncated. This option is useful when a table is being reloaded during an EXPort/TRUNCATE/IMPort operation, since a fast refresh will not be triggered.
PURGE SNAPSHOT LOG
Specifies that existing snapshot logs on this table should be purged when the table is truncated.
DROP STORAGE
Deallocates storage used by the rows and returns the space to the free space pool. This option is the default.
REUSE STORAGE
Retains the space used by the deleted rows. This option is useful if the table or cluster will be reloaded with data.
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
