Category: SQL Server
view more software Tips and Tricks
Updated: 05/09/2012 12:05 PM
Author: Shiju Mathews Status: Resolved. |
There may be situations when there is need to find out the relationship between Primary Key and Foreign Key in a SQL database. This can be done using the system objects sys.foreign_keys , sys.foreign_key_columns and sys.objects. The following script will give the details. |