Created
May 23, 2023 07:38
-
-
Save ramonsmits/447b2bfef912c8ed9865503e15079085 to your computer and use it in GitHub Desktop.
TSQL: Create DROP TABLE queries for all tables in database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT 'DROP TABLE ' + '[' + TABLE_SCHEMA + '].[' + TABLE_NAME + ']' | |
| FROM INFORMATION_SCHEMA.TABLES | |
| ORDER BY TABLE_SCHEMA, TABLE_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment