Last active
October 3, 2022 15:34
-
-
Save kagundajm/ea1d07bac1db6ce780fabb61116b666b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO $$ | |
DECLARE | |
r RECORD; | |
BEGIN | |
FOR r IN | |
( | |
SELECT table_name | |
FROM information_schema.tables | |
WHERE table_schema=current_schema() | |
) | |
LOOP | |
EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(r.table_name) || ' CASCADE'; | |
END LOOP; | |
END $$ ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment