ALTER TABLE ... ALTER COLUMN
changes type, size, nullability or collation
What changes
- Input
- column definition and its stored values
- Output or change
- column definition; values converted when the type changes
Syntax at a glance
ALTER TABLE table ALTER COLUMN column_name type_name [ NULL | NOT NULL ]
Work example
A column type, length, nullability, or collation needs a reviewed change.
Profile existing values, dependent indexes, constraints, computed columns, and application parameter types.
Check your work Every existing value converts without loss and dependent callers use the new definition.
Open Microsoft Learn for full syntax, permissions, and details for your version.