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-02
45 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-02
45 reads
2023-10-16
490 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,284 reads
2014-09-11
2,340 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)
33,613 reads
By Steve Jones
I love Chicago. I went to visit three times in 2023: a Redgate event,...
By Brian Kelley
I have found that non-functional requirements (NFRs) can be hard to define for a...
You can find the slidedeck for my Techorama session “Microsoft Fabric for Dummies” on...
Testing with AG on Linux with Cluster=NONE. it was all going ok and as...
Hi, I have two tables: one for headers with 9 fields and another for...
We're trying to understand how quick new versions of SQL server can be. Obviously...
Let’s consider the following script that can be executed without any error on both SQL Sever and PostgreSQL. We define the table t1 in which we insert three records:
create table t1 (id int primary key, city varchar(50)); insert into t1 values (1, 'Rome'), (2, 'New York'), (3, NULL);If we execute the following query, how will the records be sorted in both environments?
select city from t1 order by city;See possible answers