Get Foreign Key of all the tables for Sqlserver DB

This script will create two views and select the data from the TableReferences view. This view will give list of all the foreignkeys of the selected database with its constraint name, the table name and column name(s) on which the constraint is created and the referencing table name and column name(s).

5 (2)

2006-09-25 (first published: )

584 reads

Blogs

Spark .NET - Spark ML TF-IDF

By

Spark ML in .NET for Apache Spark Spark is awesome, .NET is awesome, machine...

Daily Coping 7 Jul 2020

By

I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to...

Publish ADF from code to further environments

By

Struggling with #ADF deployment? adf_publish branch doesn’t suit your purposes? Don’t have skills with PowerShell? I have good...

Read the latest Blogs

Forums

List of all OWNERS, not db_owner

By Footage

How can I get a list of all database owners in an instance (not...

Document recovery procedure

By Admingod

Trying to document a process in an event of disaster and different reasons. In...

Get a list of RDL that have been deployed?

By jbalbo

Hi   Trying to clean up a VS RS project. Is there a way...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers