Gareth Thomas Hill
Life & Learning Log
Friday, March 26, 2010
SQL Server - Drop/Truncate all Tables from a Database
Found
this
nice SP call to execute a statement for each table:
EXEC sp_MSforeachtable @command1 = "DELETE FROM ?"
EXEC sp_MSforeachtable @command1 = "TRUNCATE TABLE ?"
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment