TRUNCATE TABLE instantly removes all rows from one or more Amazon Redshift tables without logging individual deletes.
TRUNCATE TABLE performs a fast, metadata-only delete that drops every row in the specified table(s). Because Redshift rewrites block maps instead of logging row deletions, the command finishes almost instantly and immediately frees disk space.
Use TRUNCATE TABLE when you need a full refresh—such as staging loads, backfills, or test resets. DELETE is better when you must keep some rows, rely on predicates, or need to trigger constraints that TRUNCATE bypasses.
The basic form accepts one or more table names separated by commas. Optional CASCADE automatically truncates dependent tables.
TRUNCATE TABLE [ONLY] table_name [, ...]
[ CASCADE | RESTRICT ];
List each table, or use CASCADE to include child tables. This avoids looping through individual statements.
TRUNCATE TABLE staging_orders, staging_orderitems;
-- Remove all historical orders before reloading
TRUNCATE TABLE orders RESTRICT;
-- Now load the latest snapshot
COPY orders
FROM 's3://bucket/orders_snapshot/'
IAM_ROLE 'arn:aws:iam::123456789:role/RedshiftRole'
FORMAT AS PARQUET;
Run inside a transaction when possible; ROLLBACK will fully restore rows. Verify no other sessions are reading the table to avoid unexpected empty result sets. Grant TRUNCATE privileges sparingly.
TRUNCATE fails with RESTRICT (default) if foreign keys point to the target. Add CASCADE or truncate the children first.
Unlike DELETE, TRUNCATE is irreversible outside a transaction—be sure you have a reload plan or backup.
If executed inside BEGIN/COMMIT, use ROLLBACK to restore. After commit, recovery requires unloading from backups or snapshots.
No. The current identity value persists. Use ALTER TABLE IDENTITY RESTART if you need to reset sequences.
Yes. GRANT TRUNCATE ON TABLE staging_orders TO user_name; provides scoped access without full DDL rights.
Redshift system tables log the command text and timestamp in STL_ tables, allowing compliance tracking.