Cleanup

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

Why use XACT_ABORT?

By

This came up one day at my work when a developer was using it....

Using AI for Data Conversion

By

I’m sure I’ve never mentioned that I’m an amateur radio operator. Like Vegans and...

Advice I Like: Tipping

By

When in doubt, overtip – from Excellent Advice for Living This is close to...

Read the latest Blogs

Forums

How Much AI Code Would You Use?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item How Much AI Code Would...

Browsing for Instances

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Browsing for Instances

Creating a Date Dimension (Calendar Table) in SQL Server

By Noman072

Comments posted to this topic are about the item Creating a Date Dimension (Calendar...

Visit the forum

Question of the Day

Browsing for Instances

I have a SQL Server instance that is not listening for connections on port 1433. By default, all ports are locked down on my server, except for the SQL Server port. What can I do to allow users to connect to the instance without knowing the port?

See possible answers