Friday, January 17, 2014

Truncate All the table of Database and delete all the data of all the table from database


For truncate

USE MyDatabase
EXEC sp_MSforeachtable 'TRUNCATE TABLE ?'

For Delete


USE MyDatabase
EXEC sp_MSforeachtable 'DELETE FROM ?'