sql query to find foreign key references of a table code example Example: tsql find foreign key references EXEC sp_fkeys 'TableName'