purgingtable

Technical Article

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)

You rated this post out of 5. Change rating

2019-12-10

2,587 reads

Blogs

Scooby Dooing Episode 10: The Case of the Copy-and-Paste Consultant

By

Every Scooby-Doo episode has one thing in common — there’s always a fake ghost....

Regression Testing: DAX User Defined Functions

By

User Defined Functions is a new feature in PowerBI currently in public preview. There...

The fundamental requirements of a reporting system

By

There are some fundamental boxes that your reporting system must tick. ✅ The figures...

Read the latest Blogs

Forums

Varchar(max) to lines

By bswhipp

I have an issue with a varchar(max) field with up to 7000 characters needing...

SQL MI Next-gen general purpose tier

By SqlAdmin001

Has anyone used Azure SQL MI on the next-gen general purpose tier, Microsoft documentation...

Create an HTML Report on the Status of SQL Server Agent Jobs

By Nisarg Upadhyay

Comments posted to this topic are about the item Create an HTML Report on...

Visit the forum

Question of the Day

The Last Good DBCC Run

I want to check when DBCC CHECKDB was last run on my Baseball database. What code should I use?

See possible answers