Query to display foreign key relationships in SQL Server
Below is a query to display foreign key relationships in a database. SELECT fks.NAME AS ForeignKey, fks.is_disabled, Schema_name(fks.schema_id) + ‘.’ + Object_name(fks.parent_object_id) AS TableName, Col_name(fkcs.parent_object_id, fkcs.parent_column_id) AS ColumnName, (SELECT Schema_name(schema_id) + …
Query to display foreign key relationships in SQL Server Read More