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

585 reads

Blogs

Would You Pass the SQL Server Certifications Please? What Do You Mean We're Out?

By

I have held various certifications through my DBA career, from CompTIA A+ certification back...

PASS Summit 2020 Mental Health Presentation Eval Comments

By

I first starting presenting on mental health last December in Charlotte, NC on mental...

PASS Summit 2020 Mental Health Presentation Eval Comments

By

I first starting presenting on mental health last December in Charlotte, NC on mental...

Read the latest Blogs

Forums

questions about sys.sysprocesses/sys.dm_exec_sessions and sys.dm_exec_requests

By 892717952

I have some questions   about sys.sysprocesses/sys.dm_exec_sessions and sys.dm_exec_requests, please kindly give your guidance and...

WHILE in R

By Steve Jones - SSC Editor

Comments posted to this topic are about the item WHILE in R

Completely Encrypted Data

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Completely Encrypted Data

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

WHILE in R

See possible answers