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';
![image image](https://abundantcode.com/wp-content/uploads/2016/08/image_thumb-23.png)
Leave a Reply