Error!
Success!

Easiest / fastest way to Delete ALL records in a Database

0
kicks

Easiest / fastest way to Delete ALL records in a Database  (Unpublished)

One of the very common activities a SQL developer face is to flush records from ALL the tables in their development database. Though “Delete” and “Truncate” commands can be used to flush records in a table the issue is we can’t use them directly if we have constraints attached to some of the tables. One of the solutions is to “Delete” records in the tables in an orderly fashion. Like, “Delete” the child table first and then the parent table. As long as there are limited number of tables in the Database this solution is more than enough. But for those databases where there are lots of tables with constraints this solution would be pretty tough to implement. In those cases, try out my solution which I have explained later in this article.


Kicked By:
Drop Kicked By: