Scripts

Technical Article

Truncate tables with foreign keys

Truncating tables with constraints always had been a pain, since we have to drop and recreate all the FKs. I created a script that takes care of dropping and recreating the foreign keys while truncating. Please use with caution! and always respect your Data !

(3)

You rated this post out of 5. Change rating

2016-12-01 (first published: )

1,380 reads

Blogs

Stanford Emerging Technology Review 2026 Report is out

By

Artificial Intelligence and quantum computing are two areas of emerging technology that receive most...

How I Troubleshoot a Slow SQL Server Live

By

No two SQL Server environments are alike. A fix that resolves a performance issue...

T-SQL Tuesday #201 Invitation: Temp Tables, Friend or Foe?

By

My T-SQL Tuesday #201 invitation. Do temp tables help performance or hurt it? I...

Read the latest Blogs

Forums

Are You Working More Hours?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Are You Working More Hours?

A Limited Startup

By Steve Jones - SSC Editor

Comments posted to this topic are about the item A Limited Startup

T-SQL in SQL Server 2025: REGEXP_LIKE

By Steve Jones - SSC Editor

Comments posted to this topic are about the item T-SQL in SQL Server 2025:...

Visit the forum

Question of the Day

A Limited Startup

I add this parameter to SQL Server 2025 in the Configuration Manager:

-mDynamics
What does this do?

See possible answers