Created
July 19, 2019 13:27
-
-
Save snhrdt/9c337a6e172a68fb71d46a9a560b342c to your computer and use it in GitHub Desktop.
How to drop all tables (Postgres)
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 if exists "' || tablename || '" cascade;' | |
| from pg_tables | |
| where schemaname = 'public'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment