Truncate All Tables In Database Using sp_MSforeachtable

1 line script to truncate (delete all rows without logging the transactions) all tables within a SQL Server database.

exec sp_MSforeachtable "truncate table ? PRINT'? truncated '"

Leave a Reply