Truncate tables where Referential Integrity exists
This script can be useful in test and dev environments to quickly clear tables via the truncate command where referential integrity exists.
2024-05-15 (first published: 2024-05-02)
571 reads
This script can be useful in test and dev environments to quickly clear tables via the truncate command where referential integrity exists.
2024-05-15 (first published: 2024-05-02)
571 reads
2023-10-16
493 reads
A new error message in SQL Server 2019 will make your life much easier!? Learn more...
2019-03-05
3,244 reads
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 !
2016-12-01 (first published: 2016-11-28)
1,305 reads
2014-09-11
2,343 reads
This article describes a way to identify the user who truncated the table & how you can recover the data.
2015-02-20 (first published: 2014-06-05)
34,006 reads
By Rob Sewell
The partner directory connects your agency with new customers.
I had an excellent group of people in Gothenburg Sweden when I taught there...
By Steve Jones
How can I quickly get a CU patch for a system that’s out of...
Comments posted to this topic are about the item GIT Configuration and Automated Release...
hi a peer of mine recalls an error in an edi app that often...
Hello SSC! First, I would like to thank everyone who has responded to my...
I have created these triggers in SQL Server 2022:
CREATE TRIGGER triggertest_tri_1 ON dbo.triggertest FOR INSERT AS PRINT 'one' GO CREATE TRIGGER triggertest_tri_2 ON dbo.triggertest FOR INSERT AS PRINT 'two' GOI want to be sure that the trigger with "1" runs first. I decide to run this:
EXEC sp_settriggerorder@triggername = 'triggertest_tri_1', @order = 'first'What happens? See possible answers