Skip to content

Instantly share code, notes, and snippets.

@reisdev
Last active October 1, 2019 12:32
Show Gist options
  • Save reisdev/06831d2f87b042a0ba56087246ccb75c to your computer and use it in GitHub Desktop.
Save reisdev/06831d2f87b042a0ba56087246ccb75c to your computer and use it in GitHub Desktop.
Drops All Tables for Oracle DB PL/SQL
BEGIN
FOR c IN (SELECT table_name from user_tables)
LOOP
EXECUTE IMMEDIATE ('DROP TABLE ' || c.table_name || '
cascade constraints PURGE');
END LOOP;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment