How to do any activity like select, delete or truncate for all tables in a databases?

Use databasename


Filter the above query output by TABLE_TYPE AS TABLE.

Then copy all table_name column values from the results in SSMS and paste it in the excel sheet columns.

Then join table_name with below statements in another excel column.

Lets take how to truncate all tables in a database.


TRUNCATE TABLE  Employeesdetails

Any other method to do the above activity.


Popular posts from this blog

SQL Server:Steps to Configure Database Mirroring by T-SQL Script.

SSIS2008R2 Error: 0xC0209303 at Package: