How to Rename a Table in ClickHouse
Last updated July 25, 2026 · By the SaturnSQL team
Use RENAME TABLE old TO new. You can rename several tables in one statement, which lets you swap a rebuilt table into place, and with the default Atomic database engine the swap is atomic for queries.
RENAME TABLE events TO pageview_events;Swap two tables
RENAME TABLE events TO events_old, events_new TO events;RENAME TABLE can also move a table between databases: RENAME TABLE staging.events TO analytics.events.
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