TRUNCATE TABLE instantly removes all rows from one or more Snowflake tables without logging individual row deletions.
TRUNCATE TABLE deletes every row in the specified table(s) in a single, fast metadata operation. Storage is reclaimed immediately and no undo log is generated, making it ideal for quickly resetting staging or temporary data.
Choose TRUNCATE when you need to wipe an entire table, want the fastest possible execution, and do not require filters, triggers, or individual row recovery. Use DELETE when you must retain some rows or fire DELETE triggers.
See the full syntax below, including optional clauses, multiple tables, and transactional behavior.
You can list up to 10 tables in a single statement. Snowflake processes them in the order provided and treats the whole operation as one transaction.
Yes. Because Snowflake uses zero-copy cloning under the hood, you can recover truncated data with TIME TRAVEL or UNDROP within your retention period.
Wrap TRUNCATE TABLE in a BEGIN / COMMIT block when combining it with INSERT or COPY statements. This guarantees an all-or-nothing load pipeline.
Grant TRUNCATE
(or the broader OWNERSHIP
) privilege only to service roles or experienced engineers to avoid accidental data loss.
Snowflake throws an error if the table is missing. Add IF EXISTS
to make the command idempotent in CI/CD pipelines.
CASCADE
removes rows from child tables that reference the truncated table via FKs. Omit or use RESTRICT
if you want the statement to fail instead.
Syntax, parameters, and examples follow for copy-paste use.
No. Sequences and identity columns keep their current values after truncation. Use ALTER SEQUENCE to restart if needed.
Yes. TRUNCATE is a metadata operation and consumes minimal compute, but you still need write privileges on the table.
Snowflake records the command in ACCOUNT_USAGE.QUERY_HISTORY, so you can audit who truncated the table and when.