Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Get Relationship for your tables

By Mohit Nayyar,

Use this script to get relationship between ur tables (PK, FK), if defined. This script will give you base table and its columns (PK) with other related tables and columns (FK).
So, no need to check in the diagram.

Mohit Nayyar
MCP, MCAD (.Net), MCSD, MCDBA

Total article views: 658 | Views in the last 30 days: 2
 
Tags
miscellaneous    
t-sql    
 
Contribute