1SELECT
2 OBJECT_NAME(f.parent_object_id) TableName,
3 COL_NAME(fc.parent_object_id,fc.parent_column_id) ColName
4FROM
5 sys.foreign_keys AS f
6INNER JOIN
7 sys.foreign_key_columns AS fc
8 ON f.OBJECT_ID = fc.constraint_object_id
9INNER JOIN
10 sys.tables t
11 ON t.OBJECT_ID = fc.referenced_object_id
12WHERE
13 OBJECT_NAME (f.referenced_object_id) = 'YourTableName'
1--find all foreign keys referencing a table in sql server
2SELECT
3 OBJECT_NAME(f.parent_object_id) TableName,
4 COL_NAME(fc.parent_object_id,fc.parent_column_id) ColName
5FROM
6 sys.foreign_keys AS f
7INNER JOIN
8 sys.foreign_key_columns AS fc
9 ON f.OBJECT_ID = fc.constraint_object_id
10INNER JOIN
11 sys.tables t
12 ON t.OBJECT_ID = fc.referenced_object_id
13WHERE
14 OBJECT_NAME (f.referenced_object_id) = 'YourTableName'