Find all dependencies on a primary key I have found out how to find all dependencies on a table.

However if I just wanted to know where this primary key is used, how would I do it?

I believe we use SQL Server 2005.
I assume you're looking for all foreign keys that are based on a given table (and it's primary key). If you were on SQL Server 2008+ you could use sp_fkeys.

EXEC sp_fkeys 'TableName'


As you're on 2005 you'll have to put together this data manually. Check this previous answer by Gishu, it should give you the script you're after.

https://stackoverflow.com/questions/483193/how-can-i-list-all-foreign-keys-referencing-a-given-table-in-sql-server