ALTER TABLE … ADD COLUMN adds a new column to an existing Snowflake table without recreating it.
Expanding a table lets you store new attributes—like a customer’s phone number—without rebuilding or re-loading data. The ALTER TABLE … ADD COLUMN command performs this change instantly and is fully transactional.
Use ALTER TABLE followed by the table name and one or more ADD COLUMN clauses. Each clause defines the column name, data type, default, nullability, masking policy, and an optional comment.
ALTER TABLE Customers
ADD COLUMN phone VARCHAR(20);
This creates a nullable phone column at the end of the Customers table.
ALTER TABLE Orders
ADD COLUMN shipped_at TIMESTAMP,
shipping_method STRING DEFAULT 'standard';
Supply commas between column definitions; the table is locked for the minimum time needed.
ALTER TABLE Products
ADD COLUMN IF NOT EXISTS weight NUMBER(8,2);
IF NOT EXISTS makes the command idempotent—useful in CI/CD pipelines.
Add the column with a DEFAULT value, then alter it to NOT NULL once every row is populated.
ALTER TABLE OrderItems
ADD COLUMN status STRING DEFAULT 'pending';
ALTER TABLE OrderItems
ALTER COLUMN status SET NOT NULL;
Snowflake always appends new columns. Physical order is cosmetic; use SELECT lists to reorder output.
• Always specify NULL or NOT NULL explicitly.
• Add DEFAULTs when backfilling isn’t practical.
• Use IF NOT EXISTS in deployment scripts.
• Version-control DDL alongside application code.
Missing default on NOT NULL. Snowflake errors if rows violate NOT NULL; add with DEFAULT first.
Wrong database or schema context. Prefix table names (e.g., analytics.public.Customers) or run USE commands before altering.
Immediately run ALTER TABLE … DROP COLUMN or use Time Travel to query the pre-change version.
Bundle ALTER statements in a transaction or deploy via pipelines that include validation queries.
Snowflake performs metadata changes only, so locks are brief and queries keep running.
No. New columns append to the end, but you can reorder in SELECT clauses or create a view.
Yes. Clones reference the updated metadata, so the new column appears instantly in all clones.