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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Editing a Constraint

Author  Topic 

Mannga
Yak Posting Veteran

70 Posts

Posted - 2002-01-24 : 06:54:43
Hi All,

I have a table which has a constraint on it that I would like removed.
How do I go about doing this?

I don't even seem to be able to find this constraint.

Thanks.
Gavin

fisherman_jake
Slave to the Almighty Yak

159 Posts

Posted - 2002-01-24 : 07:29:41
Gavin,

G'day, there are 2 ways to remove a constraint.
1) ALTER TABLE [TABLENAME] DROP CONSTRAINT [CONSTRAINT NAME]
2) (more drastic) DROP TABLE [TABLENAME] (this will definitely get rid of your constraint, and of course your table as well)

One way to find the constaints you have on your table is to go through ENTERPRISE MANAGER and right click on the table and click on generate scripts, and one of the options on it will have generate INDEX, blah blah blah, CONSTRAINTS, Primary Key, blah blah.. Just hunt around for it. I can't be more specific coz I'm at home and I don't have SQL server installed on my machine..

Oh well, hope that helps...

==================================================
World War III is imminent, you know what that means... No Bag limits!!!
Master Fisherman
Go to Top of Page

Mannga
Yak Posting Veteran

70 Posts

Posted - 2002-01-24 : 09:11:15
You the man

Exactly what I was looking for.

Cheers,
Gavin

Go to Top of Page
   

- Advertisement -