How to Change a Column Type in Snowflake

Last updated July 24, 2026 · By the SaturnSQL team

ALTER TABLE ... ALTER COLUMN only allows safe changes (e.g. widening VARCHAR, increasing NUMBER precision). For real type changes, add a new column, backfill it with a cast, then swap names.

Allowed in place

The permitted in-place changes are the ones that cannot lose data: widening a VARCHAR, increasing NUMBER scale, or dropping NOT NULL. Narrowing a VARCHAR, converting NUMBER to VARCHAR, or anything that could fail on an existing value is rejected outright with an error rather than attempted.

ALTER TABLE orders ALTER COLUMN note SET DATA TYPE VARCHAR(2000);

The add-backfill-swap pattern

Run the four statements inside a transaction so the table is never left half-migrated. TRY_CAST is deliberate: a plain cast fails the whole UPDATE on one bad row, whereas this leaves NULLs you can count and investigate. Check for rows where amount is set but amount_v2 came back NULL before dropping the original column.

ALTER TABLE orders ADD COLUMN amount_v2 NUMBER(12,2);
UPDATE orders SET amount_v2 = TRY_CAST(amount AS NUMBER(12,2));
ALTER TABLE orders DROP COLUMN amount;
ALTER TABLE orders RENAME COLUMN amount_v2 TO amount;

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 Snowflake guides