October 24, 2001 at 8:53 am
I'm new to SQL Server so I need your help. What is the easiest way to identify all constraints (e.g., foreign keys ... named or anonymous, check constraints, etc.) for a specific schema?
Thanks in advance!
Tom
October 24, 2001 at 10:18 am
You can generate a database diagram. Other than that, you can script the database and look for the "constraint" keyword.
Steve Jones
October 24, 2001 at 10:23 am
If you are just looking at finding all constraints, regardless of type, use the INFORMATION_SCHEMA.TABLE_CONSTRAINTS view. It only returns information on objects the user has permissions to, but if you're running as dbo, you should pull everything back.
K. Brian Kelley
http://www.sqlservercentral.com/columnists/bkelley/
K. Brian Kelley
@kbriankelley
October 24, 2001 at 6:45 pm
Great answer Brian. Information schema way under used!
Andy
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply