Friday, February 24, 2012

list constraints

how can i use query analyzer to list the constraints for a given table?
hi
for this u can use sp_help <tablename>
http://msdn.microsoft.com/library/de..._help_304w.asp
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
"mcnewsxp" wrote:

> how can i use query analyzer to list the constraints for a given table?
>
>
|||Hi,
You could also query the information schema system view.
Select * from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
where table_name='tablename'
Thanks
Hari
SQL Server MVP
"mcnewsxp" <mcourter@.mindspring.com> wrote in message
news:utbw6EElFHA.2920@.TK2MSFTNGP14.phx.gbl...
> how can i use query analyzer to list the constraints for a given table?
>

No comments:

Post a Comment