Other SQL implementations have similar restrictions. The reason is that adding a column requires adding values for that column (logically, even if not physically), which default to NULL
. If you don't allow NULL
, and don't have a default
, what is the value going to be?
Since SQL Server supports ADD CONSTRAINT
, I'd recommend Pavel's approach of creating a nullable column, and then adding a NOT NULL
constraint after you've filled it with non-NULL
values.