Advertisement
dwhitzzz

Drop all tables in schema | Postgres

Feb 11th, 2020
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.12 KB | None | 0 0
  1. -- postgres
  2. SELECT 'drop table if exists "' || tablename || '" cascade;'
  3.   FROM pg_tables
  4.  WHERE schemaname = 'yourOwner';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement