Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Drop all tables from one schema in Postgres
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
You can’t perform that action at this time.