Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drop column failed
Message
From
09/03/2011 18:16:24
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01503074
Message ID:
01503120
Views:
32
>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.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform