Technical Article

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: )

588 reads

Blogs

Daily Coping 26 Jan 2023

By

Today’s coping tip is to focus on what’s good, even if today feels tough....

Working With Tags in FlashArray using PowerShell

By

Introduction Purity is the operating environment that runs Pure Storage products like FlashArray and...

Using SQL Data Compare from the Command Line with a Project

By

SQL Data Compare (SDC) is a great way to sync data among tables. It’s...

Read the latest Blogs

Forums

Speakers Are Normal People

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Speakers Are Normal People

Publishing a Public Power BI Report from Google Sheets

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Publishing a Public Power BI...

Automatic Formatting of Code

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Automatic Formatting of Code

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers