Skip to content

Instantly share code, notes, and snippets.

@mizanRahman
Created December 4, 2015 17:41
Show Gist options
  • Select an option

  • Save mizanRahman/342b82d398442c34661f to your computer and use it in GitHub Desktop.

Select an option

Save mizanRahman/342b82d398442c34661f to your computer and use it in GitHub Desktop.
BEGIN
--Bye Sequences!
FOR i IN (SELECT us.sequence_name
FROM USER_SEQUENCES us) LOOP
EXECUTE IMMEDIATE 'drop sequence '|| i.sequence_name ||'';
END LOOP;
--Bye Tables!
FOR i IN (SELECT ut.table_name
FROM USER_TABLES ut) LOOP
EXECUTE IMMEDIATE 'drop table '|| i.table_name ||' CASCADE CONSTRAINTS ';
END LOOP;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment