Click here to Skip to main content
15,890,372 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Dear All,

my quation is one table relation to how many tables related. how to find out table relation. i need how to find out relation through sql command .
Posted

ya above is right solution

<b>
EXEC sp_depends 'Customers'</b>
 
Share this answer
 
v2
To view objects which are depend on a table :
SQL
EXEC sp_MSdependencies N'TableName', null, 1315327


To view objects on which a table depend on :
SQL
EXEC sp_MSdependencies N'TableName', null, 1053183


Extracted from here :
http://www.mssqltips.com/sqlservertip/1294/listing-sql-server-object-dependencies/[^]

Hope it helps.
 
Share this answer
 
Comments
Abhinav S 29-Jan-12 3:22am    
Fair answer. 5.
Amir Mahfoozi 29-Jan-12 3:27am    
Thanks Abhinav. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900