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

583 reads

Blogs

Trace Query in Extended Events

By

The ability to quickly and easily trace a query is important to database professionals....

Using Erik Darling’s sp_pressure_detector to resolve CPU issues

By

Last Friday I spent my lunch break going through some links I had marked...

How to Resolve Remove-AzKeyVaultKey : Operation returned an invalid status code ‘Forbidden’ Error

By

I’ve come across another error message in my seemingly never-ending battle with Azure Key...

Read the latest Blogs

Forums

Read Only Files

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Read Only Files

Why A Query May be Faster the Second Time it Runs

By Kendra Little

Comments posted to this topic are about the item Why A Query May be...

OLE DB 0x80004005 connection error trying to run SQL HA Maintenance Plans

By sg_twinmaple

Hi, I'm getting a connection error when I try to run even the most...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers