SQL Server Performance Forum – Threads Archive
Defaults Values etc
is it possible to list for an entire DB all of the following All constraintsAll Foreign Keys
All Defaults values
SELECT
CAST(OBJECT_NAME(constid) AS CHAR(35))
FROM
sysconstraints might be one way. Generally you should prefer the INFORMATION_SCHEMA views. ———————–
–Frank
http://www.insidesql.de
———————–
<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=’

]]>