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
 Querying Constraints in a DB

Author  Topic 

singhch
Starting Member

1 Post

Posted - 2007-01-23 : 01:02:52
Hi there,

Is there a way where I can run a query or a store procedure where i can retrieve all the contraints attached to the tables in the database?

thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-23 : 01:48:49
select * from information_schema.constraints
select * from information_schema.CONSTRAINT_TABLE_USAGE

Why invent the wheel again? See this topic
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72957


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -