invite friends  Invite Friends RECRUITER : Login | Register | Post Job | Search Resume   
Forum
Home >> What is Oracle? >> How to delete all tables in oracle 9i software working with SQL
Add New   How to delete all tables in oracle 9i software working with SQL
William Gill
Thu May 27, 2010
what option is to be used to delete all the existing tables in SQL in Oracle 9i
John Gates
Thu May 27, 2010
Fastest way is to drop the schema/user where the tables reside. The only problem with dropping the schema/user is that ALL objects (tables, indexes, synonyms, procedures, etc) associated with that user are dropped as well. So this should be the last resort.

you can also run a plsql script similar to this to drop all tables for current logged in user:

Begin
for c in (select table_name from user_tables) loop
execute immediate ('drop table '||c.table_name);
end loop;
End;

Use with Extreme Caution as there is no turning back when you have dropped a table.