How to drop all tables from database with one SQL query?

 How to drop all tables from database with one SQL query?

You can write query like this:

USE Databasename

SELECT  'DROP TABLE ' + name + ';'
FROM    sys.tables
You can copy and paste into a new SSMS window to run it.

Comments

Popular posts from this blog

Network adapter does not showing in device manager