I need to remove a highly referenced table in a SQL Server database. How can I get a list of all the foreign key constraints I will need to remove in order to drop the tabl
Also try.
EXEC sp_fkeys 'tableName', 'schemaName'
with sp_fkeys you may filter the result by not only pk table name and schema but also with fk table name and schema. link
sp_fkeys