Skip to content

Instantly share code, notes, and snippets.

@rafaeljesus
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save rafaeljesus/4e838d03842d5f4dcf8c to your computer and use it in GitHub Desktop.

Select an option

Save rafaeljesus/4e838d03842d5f4dcf8c to your computer and use it in GitHub Desktop.
begin
for i in (select 'drop table '||table_name||' cascade constraints' tbl from user_tables)
loop
execute immediate i.tbl;
end loop;
end;
select 'drop table '||table_name||' cascade constraints;' from user_tables;
-- copy, paste and exec results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment