.NET Programming With Me

SQL Server: Generate delete queries for entire tables in a database.

SELECT 'DELETE FROM ' +TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'

This query helps us to view the delete queries for all the tables in the used database.

No comments: