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

Blogs

Flying Halfway Around the World to Australia

By

I leave tonight for Australia. I was in London 3 days ago, so this...

Dealing with Change – Two Resources

By

As I look at the state of information technology today, I see one constant:...

Cloud Databases Made Simple: Creating Your First AWS RDS Instance

By

I recently started full time learning of Amazon Web Services (AWS). I found that...

Read the latest Blogs

Forums

SQL 2017 throwing BugCheck on differential database restore

By arran.franklin

Long time listener, first time caller. I have a problem that my usual bag...

cluster node quarantined

By StillaLearner

evening All hoping someone can shed some light - I have a (originally) 2...

Is this version SQL Server Management Studio15.0.18424.0 buggy or...?

By pietlinden

Maybe I'm just doing something really simple and dumb. I imported a bunch of...

Visit the forum

Question of the Day

Using Table Hints in a Query

How many table hints can I include in a query?  

See possible answers