Removes an existing column from a Snowflake table, permanently deleting its data and metadata.
DROP COLUMN removes a column’s data, metadata, constraints, and lineage from a table. After execution, the column and its history are unrecoverable unless you restore the table from Time Travel.
Use ALTER TABLE <table_name> DROP [ COLUMN ] <column_name> [ , <column_name> ... ] [ CASCADE | RESTRICT ]
. Add IF EXISTS
to avoid errors when the column might not exist.
List columns comma-separated: ALTER TABLE Orders DROP COLUMN discount, promo_code;
. Snowflake applies the statement atomically—either all columns are removed or none if an error occurs.
If a view or foreign key references the column, use CASCADE
to drop those objects automatically. Use RESTRICT
(default) to abort when dependencies exist, protecting production data.
discount
from Orders-- Backup with transient clone
CREATE OR REPLACE TABLE Orders_backup CLONE Orders;
-- Drop the obsolete column
ALTER TABLE Orders DROP COLUMN IF EXISTS discount RESTRICT;
The statement fails if any view still selects discount
, keeping your model consistent.
Back up the table with CLONE
, confirm dependencies by querying INFORMATION_SCHEMA.COLUMNS
, and run in a transaction on critical tables to keep rollbacks simple.
Yes – if Time Travel retention has not expired, you can restore the whole table to a point before the drop or clone it from historical data.
Logical removal is immediate, but physical storage is reclaimed asynchronously by Snowflake’s background services.
No. Snowflake runs the operation as a metadata change, so it completes quickly and does not lock the table for reads.