How to Add a Column in ClickHouse
Last updated July 25, 2026 · By the SaturnSQL team
Use ALTER TABLE ... ADD COLUMN, which is a cheap metadata change; existing parts are not rewritten. A DEFAULT expression is computed when the column is missing, while MATERIALIZED is always computed on insert and hidden from SELECT *.
ALTER TABLE events ADD COLUMN country LowCardinality(String) DEFAULT '';DEFAULT vs MATERIALIZED
DEFAULT applies when an insert omits the column and when old parts are read. MATERIALIZED columns are derived: clients can never insert them directly and they only appear when selected explicitly.
ALTER TABLE events ADD COLUMN event_date Date MATERIALIZED toDate(event_time);Control position
ALTER TABLE events ADD COLUMN referrer String DEFAULT '' AFTER url;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