Defaults Values etc | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Defaults Values etc

is it possible to list for an entire DB all of the following All constraints
All Foreign Keys
All Defaults values
sysconstraints might be one way. Generally you should prefer the INFORMATION_SCHEMA views. ———————–

<pre id="code"><font face="courier" size="2" id="code">select * from INFORMATION_SCHEMA.CHECK_CONSTRAINTS </font id="code"></pre id="code"><br /><br />INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE for table usage<br />INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE for column usage<br /><br />… this is preferred method rather than querying directly the system tables. [<img src=’/community/emoticons/emotion-5.gif’ alt=’;)‘ />]<br /><br /><hr noshade size="1"><b>Satya SKJ</b><br />Moderator<br /<a target="_blank" href=http://www.SQL-Server-Performance.Com/forum>http://www.SQL-Server-Performance.Com/forum</a><br /><center><font color="teal"><font size="1">This posting is provided “AS IS” with no rights for the sake of <i>knowledge sharing.</i></font id="size1"></font id="teal"></center>