sql find all tables with foreign key to table code example Example: tsql find foreign key references EXEC sp_fkeys 'TableName'