>> GreenByte.info By Nick Tong (quiksilv) | Supported by: TalkWebSolutions.co.uk

Want to drop all you database tables for MSSQL?

I've just needed to clear a database to test a setup SQL script. Here is the script just in case anyone out there needs to do the same:

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


 
Comments
Jane's Gravatar Nice... Didn't know about these 2 special sps (the other one being sp_MSforeachdb - see http://www.databasejournal.com/features/mssql/arti... for more)
# Posted By Jane | 29/01/08 13:21 | Report abusive comment
BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.