Data cleanup

T-SQL script to purge all the tables including foreign key references

  • Script

T-SQL script to purge all the tables including foreign key references. The script has been made smart enough to use TRUNCATE wherever there is no foreign key reference and to use DELETE wherever there is foreign key reference.

5 (3)

2019-11-11 (first published: )

596 reads


Transaction log Information gathering


Here are the different ways to know the tlog file related information sys.dm_db_log_stats –...

What's New in SQL 2019? at BRSSUG


Thanks to everyone who joined the BRSSUG for a night all about SQL Server...

Data Lake Architecture using Delta Lake, Databricks and ADLS Gen2 Part 3


This is the third post in a series about modern Data Lake Architecture where...

Read the latest Blogs


MSAccess to SQLServer Query Conversion

By Whizkid

Hi, Our client have MS-Access database which has more queries written in MS-Access 2010...

Log file growth

By Admingod

Index maintenance and loading data conflict with each other cause the log file to...

comparison operator in count() is not working

By satishpatro

SELECT 15 > 14 FROM Duel; Working in MySql but not in SqlServer SQL...

Visit the forum


SQL Server Q&A from the SQLServerCentral community

Get answers