February 11, 2010 at 6:09 am
Hello Everyone
Hope that everyone is well today.
I am working on some database code. Imagine that.......
I am need to drop a constraint, I have the syntax for that, no problem. I am using "Alter Table". If anyone has something better or something else. I do not know of anything else.
I am wanting to check the existence of the Constraint before trying to drop it. Just like you would before you drop a procedure or a table. In what system table does a constraint exist that I can query before dropping
Thanks
Andrew SQLDBA
February 11, 2010 at 6:38 am
this will give you all constraint in particular database.
select * from sys.objects where type_desc like '%_CONSTRAINT'
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
February 11, 2010 at 7:45 am
Cool
Thanx
March 7, 2010 at 8:50 pm
There are additional system views if you are looking for a particular type of constraint.
Examples include:
Paul
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply