Saturday, February 25, 2012

Need Transact-SQL code

Is there any transact code for sql server that I can type out to view all of the relationship Definments of the current database or even an individual table.Moving thread to T-SQL forum.|||Please take a look at the INFORMATION_SCHEMA views in SQL Server 70/2000/2005 or the system catalog views in SQL Server 2005. There are also system stored procedures like sp_helpconstraint, sp_helpindex, sp_help that will give you similar information. Search in Books Online for these SPs or views.|||

Yes. (sorry about my poor english)

Making an "simplest" answer, point to the system tables sysindexes (index), sysreferences (fk) and syscomments (views, tr, sp).

No comments:

Post a Comment