Created
May 15, 2018 03:15
-
-
Save spacewander/848af646e91eeecef386fbc436285947 to your computer and use it in GitHub Desktop.
my pgsql collection
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
-- drop all table in a database | |
select string_agg('drop table "' || tablename || '" cascade', ';') from pg_tables where schemaname = 'public'; | |
-- copy the ouput and execute it | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment