Tables Dependencies (Parent – Child) | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Tables Dependencies (Parent – Child)

I’m new in SQL server,<br />and my question is…<br /><br />I was asked to identify the master table and the slave tables link-related in a large database with more than 100 tables.<br /><br />I mean …in the case of 3 tables (a,b,c), table (a) has a primary key with Child table (b), and this one is linked with table c.<br /><br />In this case is easy to identify the Parent table….—&gt; a, and Child b, and c, but in a large database is there a tool (also third party), or T-Sql procedure which answer to my question (any tools can resolve dependencies)?<br /><br />I have tried to use the diagram provided by SQL Server Manager, but is impossible to undestand any table correlations.<br /><br /><br />Thank to everybody, any help will be appreciated….<br /><br />[<img src=’/community/emoticons/emotion-6.gif’ alt=’:(‘ />]
You can use sp_pkeys ‘TableName’ or sp_fkeys ‘TableName’ to know the relations
Otherwise you can use this query also select * from information_schema.KEY_COLUMN_USAGE Madhivanan Failing to plan is Planning to fail
]]>