Generate Add Foreign Keys statements for the table

I was going through the painfull optimization of the database of creating better clustered indexes (not the default ones on the primary key).This operation was requiring removing all foreign keys to this table and then recreation them again.I created this script to optimize this quite tidious task.

1 (1)

2006-06-08 (first published: )

734 reads

Blogs

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...

Continuous integration and delivery (CI/CD) in Azure Data Factory using DevOps and GitHub - Part 2

By

(2020-Jan-28) This blog post is a followup to my previous post about DevOps (CI/CD) for...

Extended Events Misperceptions: Profiler is Easier, Part 2

By

I wrote a short blog post about the misperception that Profiler was easier than...

Read the latest Blogs

Forums

COHESITY for Backup/Restore?

By daniel.dolan

Any one have any experience with using Cohesity as the backup/restore platform instead of...

View runs slower

By sathwik.em91

I have the following query SELECT DateADD(day,9-DATEPART(dw,cdata .call_datetime ),cast(cdata .call_datetime as date) ) as...

Parallel Load thousands csv Files

By info 58414

Hi, what is the fastest way to load thousands of csv files with the...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers