Simplest way to Truncate all tables in a given database.
Use databasename
EXEC sp_MSForEachTable 'Truncate TABLE ?' --- For Truncating all tables
Simplest way to Truncate all tables in a given database.
Use databasename
EXEC sp_MSforeachtable @command1
= "DROP TABLE ?" --- For Deleting all tables
No comments:
Post a Comment