Find all Foreign Key / Primary Key relationships in a DB in MS SQL Server
July 2nd, 2009
| Tags: foreign key, key relationships, primary key, sql, sql server
I was looking for a way to find all the foreign keys to a primary key in a certain table in a certain database today at work. A co-worker of mine found this link:
It gives a script to use on the database that finds all the primary/foreign key relationships in the database. You can limit it to just a particular table in the WHERE clause.
This is very useful!
Leave a comment
| Trackback

