Skip to content

Instantly share code, notes, and snippets.

@snhrdt
Created July 19, 2019 13:27
Show Gist options
  • Save snhrdt/9c337a6e172a68fb71d46a9a560b342c to your computer and use it in GitHub Desktop.
Save snhrdt/9c337a6e172a68fb71d46a9a560b342c to your computer and use it in GitHub Desktop.
How to drop all tables (Postgres)
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