PostgreSQL : Drop all tables in a schema
- Drop & Create The schema
DROP SCHEMA CASCADE;
CREATE SCHEMA ;
- Selectively Delete the tables
SELECT
'drop table if exists "' || tablename || '" cascade;' as pg_drop
FROM
pg_tables
WHERE
schemaname= ;
References
01. https://stackoverflow.com/questions/3327312/drop-all-tables-in-postgresql
02. https://skyvia.com/gallery/drop-all-tables-in-postgresql