Wednesday, September 23, 2009

Oracle: Drop all tables in the present schema

1. Login as the desired user
2. Issue this SQL
select 'drop table ', table_name, 'cascade constraints ;' from user_tables;

3. You will then get a list of drop table commands.
4. Just copy/paste into an SQL editor of your choice and run the whole batch of scripts

No comments:

Post a Comment