How to Drop a Column in ClickHouse

Last updated July 25, 2026 · By the SaturnSQL team

Use ALTER TABLE ... DROP COLUMN. It is a lightweight operation: the column's files are deleted from data parts without rewriting the rest. You cannot drop columns that are part of the primary key or sort key.

ALTER TABLE events DROP COLUMN referrer;

Drop only if present

ALTER TABLE events DROP COLUMN IF EXISTS legacy_flag;

If the column is referenced by a materialized view or a MATERIALIZED/DEFAULT expression of another column, drop or fix those dependencies first, otherwise the ALTER fails.

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

Related ClickHouse guides

© 2026 Panda Capital Oy Ab. All rights reserved.