Foreign Key DDL wizard

This script can be run when you want to do batch processing on a database, such as a dynamic truncate statement for all tables in your database.  This script will actually script all the Foreign Keys in your database, and then store them into a table called FOREIGN_KEY_TEMP.  It will then generate, and execute, all […]

2004-01-22

210 reads

Generate all database foreign keys

This script will create another script that has all foreign key DDL that exists in a given database.   You only have to run this, and then select the results of this script and paste it into another query window, or if for some reason you have lost your DDL this will enable you to retrieve […]

2003-11-12

222 reads

Blogs

Daily Coping 18 Sep 2020

By

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

Optimize for Unknown for Inline Table-Valued Functions

By

I had a curious performance issue today. An inline table-valued function (iTVF) was performing...

Daily Coping 17 Sep 2020

By

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

Read the latest Blogs

Forums

SQL Server 2016 seeding automatic stuck

By zouzou

Hi all, Problem help please, I have 2 servers in sql server 2016 and...

will this get replicated to secondary replica

By coolchaitu

Dear Experts, In Availability Group, if we move ndf file to another drive on...

slow query performance

By vsamantha35

Hi All, I have a SELECT query which is taking more 8 mins. Can...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers