I have generated an ALTER script which drops a column from a table in SQL Server 2008. The column has a default set in the “Default value or binding” column properties in SQL Server Management Studio.
When I run the ALTER script, I get an error that the column can’t be dropped because it is in use. I needed to add the following command manually in the ALTER script for it to succeed:
ALTER TABLE MyTable DROP CONSTRAINT DF_MyTable_MyField
The ALTER script was generated after a reverse engineering of the database.
Let me know if you need more information about this bug.