How to drop all tables from Sql Server

By Emanuele Bartolesi at February 28, 2010 16:45
Filed Under: Sql Server

To drop all tables from a sql server database with one command is very simple.
You can use the system stored procedure "sp_MSforeachtable".

Paste in query editor the snippet:

exec sp_MSforeachtable "DROP TABLE ? PRINT '? dropped' "

 

That's all folks!

About me

I will also give you some useful tips, based on the modest wisdom gained during the years that I've worked as a developer and project manager.

Widget

Ohloh profile for Emanuele Bartolesi

 

Wakoopa

Software tracking

 

Software tracking

from Amazon



hacker emblem



Scarica il pdf di Game
Rivista Game di videogiochi
Trucchi videogiochi