Skip to content

Instantly share code, notes, and snippets.

@lamngockhuong
Created August 6, 2024 10:33
Show Gist options
  • Save lamngockhuong/40debf320d1b7f5d57050d08dee8f745 to your computer and use it in GitHub Desktop.
Save lamngockhuong/40debf320d1b7f5d57050d08dee8f745 to your computer and use it in GitHub Desktop.
List all tables that need to be dropped from the public schema.
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