You might need to write a T-SQL Query to retrieve all the foreign key constraints of a given table in SQL Server. For these cases , you can use the sp_fkeys stored procedure.
How to get all the Foreign Key constraints list of a table in SQL Server ?
USE AdventureWorks2014; GO EXEC sp_fkeys @pktable_name = N'Department' ,@pktable_owner = N'HumanResources';
Leave a Reply