I wish to all know how the tables in my database are related to each other (i.e PK/FK/UK) and hence i created a database diagram of all my tables in SQL Server. The diagram
select * from information_schema.REFERENTIAL_CONSTRAINTS where UNIQUE_CONSTRAINT_SCHEMA = 'TABLE_NAME'
This will list the column with TABLE_NAME and REFERENCED_COLUMN_NAME.
TABLE_NAME
REFERENCED_COLUMN_NAME