>>Peter suggests to check the indexes (if any index includes this field).
>>
>>You can check indexes using
>>sp_HelpIndex SP.
>>
>>In addition, the field can be used in Check constraint.
>
>You may say thanks to him. But, I believe it goes back to what I was saying earlier on today. I see some items in Constraints. When I removed them all, I was able to run the script. I believe the DEFAULT WITH VALUES clauses add item in the constraint list.
>
>So, basically, I will have to adjust my script to remove all the constraint related to the field I need to remove before executing the ALTER TABLE DROP COLUMN line.
>
>I also found it quite confusing that when we remove a constraint manually from SSMS that it doesn't get removed. It is, but we have to force a refresh to get the updated list.
The default constraint was the one preventing the executuon of the DROP COLUMN. I now realized it myself, you do need to drop all constraints referecing the field prior to dropping the field.
If it's not broken, fix it until it is.
My Blog