How to delete all tables from Sql server Database

IntroductionIn this article i will explain the command for how to delete all the tables from Sql Server database.

Description: In previous articles i explained How to delete all stored procedures from sql server database and How to delete all views from sql server database and  How to delete all triggers from sql server database . Now i am going to share the command to delete all the table from the database.

Note: The command will delete all the tables from the database so use with care.Here is the command:

Implementation: In sql server execute the following command:


EXEC sp_MSforeachtable @command1 = "DROP TABLE ?" 

Previous
Next Post »

If you have any question about any post, Feel free to ask.You can simply drop a comment below post or contact via Contact Us form. Your feedback and suggestions will be highly appreciated. Also try to leave comments from your account not from the anonymous account so that i can respond to you easily..