Truncate

Technical Article

Truncate tables with foreign keys

  • Script

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,370 reads

Blogs

ISACA AI Material/Exam Prep Discount (May 18 – June 30, 2026)

By

If you are considering any of the ISACA AI certs like the Advanced Artificial...

A Fabric solution can be very cost effective

By

Are you currently using Microsoft Fabric or considering migrating to it? If so, there...

Track SQL Server Configuration Changes Using the Error Log

By

Track SQL Server Configuration Changes Using the Error Log If you...

Read the latest Blogs

Forums

Alamat kontak resmi BCA KCU TANGERANG CITY Telp:0817866887

By Halo BCA

Tlp/Wa_Cs:0817-866-887  Komp. Tangerang City Ruko Skandinavia Blok H 6-8 & 18-20, Jl. Jenderal Sudirman...

Alamat kontak resmi BCA KCP MERR Tlp/Wa:0817866887

By Layanan BCA 24 JAM

WhatsApp:0817-866-887 Jl. Dr Ir H Soekarno, Ruko promenade. 8 Surabaya 60298, Kedung Baruk, Kec....

Alamat kontak resmi BCA KCP Tidar Telp:0817866887

By Layanan Bank BCA

WhatsApp:0817866887 Jl. Tidar No.109, Petemon, Kec. Sawahan, Surabaya, Jawa Timur 60252

Visit the forum

Question of the Day

Detecting Deadlocks Quickly

In the Database Engine, when a deadlock is detected, what does the detection interval shrink to (in time)?

See possible answers