Create dropscript in Oracle
This is a quite smooth way to create a “drop all tables” script.
Note that it does not take care of foreign key relations, which means that it might throw errors when running.
select 'drop table ' || table_name || ';' from ALL_TABLES;
You might want to a where statement for example for owner:
select 'drop table ' || table_name || ';' from ALL_TABLES where owner='xxx'
Etiketter: oracle
