List both Primary and Foreign Keys on Tables

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 817

SELECT
DISTINCT
Constraint_Name AS [Constraint Name],
Table_Schema AS [Table Schema],
Table_Name AS [Table Name]
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE;

Comments or Responses

Login to post response