Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Dropping Constraints

Author  Topic 

pravin14u
Posting Yak Master

246 Posts

Posted - 2007-10-15 : 07:59:04
How to remove the constraints on a table in sql server 2000? I need to drop the column, so i need to drop the constraint before that.

Alter Table Table_Name NO CHECK constraints ALL.

Once I execute the above one, it says, "Successfully Executed" but when I try to drop it doesnt allow me and gives me the following error:

Server: Msg 5074, Level 16, State 1, Line 1
The object 'DF_Users_Created_by' is dependent on column 'CREATED_BY'.
Server: Msg 4922, Level 16, State 1, Line 1
ALTER TABLE DROP COLUMN CREATED_BY failed because one or more objects access this column.

Any ideas?

Thanks,

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-10-15 : 08:08:00
Maybe this?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=90987



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-10-15 : 08:29:09
Just like a Number 11 bus, eh?!!

The third one will be along in a minute ...
Go to Top of Page
   

- Advertisement -