How to Change a Column Type in ClickHouse
Last updated July 25, 2026 · By the SaturnSQL team
Use ALTER TABLE ... MODIFY COLUMN with the new type. The change runs as a mutation that rewrites the column in every part, so it is asynchronous and can take a while on big tables. Sort-key columns can only change to types with compatible ordering.
ALTER TABLE events MODIFY COLUMN url LowCardinality(String);Watch the rewrite
SELECT command, parts_to_do, is_done
FROM system.mutations
WHERE table = 'events' AND NOT is_done;Values are converted with CAST semantics; incompatible values make the mutation fail (see latest_fail_reason in system.mutations). Test the conversion first with a SELECT using the target type.
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