Removes the default value expression from a column. INSERTs that omit the column afterward receive NULL (or fail if the column is NOT NULL).
ALTER TABLE <table> ALTER COLUMN <column> DROP DEFAULT
## Overview ALTER TABLE ALTER COLUMN DROP DEFAULT removes the default expression from a column's metadata. After the drop, INSERTs that omit the column receive NULL. If the column is also NOT NULL, INSERTs that omit it fail. ## Behavior - Existing rows are not modified. Values previously inserted by the default expression remain as concrete values on disk. - DROP DEFAULT is a no-op when the column has no default. The ALTER still produces a new commit on the parent table. - The drop affects future INSERTs only. Schema-level NOT NULL constraints are unchanged; if the column is NOT NULL with no default, INSERTs that omit it now fail. ## Access Control No specific privilege is required beyond table-level access in the standalone SQL layer. ## Compatibility Standard SQL syntax.
| Name | Type | Description |
|---|---|---|
table | Specifies the Delta table to alter. | |
column_name | Specifies the column whose default expression to remove. The column must already exist. |
-- Remove the default from a status column
ALTER TABLE orders ALTER COLUMN status DROP DEFAULT;