Created
April 9, 2017 17:20
-
-
Save ophentis/812fac5eb9f0589c16b8666a9a1a87d7 to your computer and use it in GitHub Desktop.
postgresql drop table generator
This file contains 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'; -- or any other schema |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment