Delete Data

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

Blogs

Query to Email….Well Formatted Email

By

When I get alerts from SQL Server I want it to do three things...

Announcements from the Microsoft Fabric Community Conference

By

A ton of new features for Microsoft Fabric were announced at the Microsoft Fabric Community...

Why Your SQL Server Backups Aren’t Enough

By

SQL Server backups are database insurance – you don’t really appreciate them until disaster...

Read the latest Blogs

Forums

FARE LABS Pvt Ltd: Reliable Laboratory for Testing Cosmetics and Personal Care P

By farelabs

Leading NABL-accredited laboratory FARE LABS Pvt Ltd provides thorough testing and analysis services for...

Upgrades to SQL Server 2022

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Upgrades to SQL Server 2022

Elements of the SQL Server Update Statement

By Kenneth Igiri

Comments posted to this topic are about the item Elements of the SQL Server...

Visit the forum

Question of the Day

Upgrades to SQL Server 2022

What is the earliest version from which you can directly upgrade to SQL Server 2022?

See possible answers