How to Truncate a Table in ClickHouse
Last updated July 25, 2026 · By the SaturnSQL team
TRUNCATE TABLE removes all rows immediately while keeping the table definition. It cannot be undone, so double-check the table name. To remove only old data, DROP PARTITION or TTL are the better tools.
TRUNCATE TABLE session_logs;Avoid errors in scripts
TRUNCATE TABLE IF EXISTS session_logs;Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free