Showing posts with label database. Show all posts
Showing posts with label database. Show all posts

Friday, April 10, 2015

How to Drop All User Tables in Oracle

Problem
You want to remove/drop all user tables from on Oracle Database.

Solution
1. Run the following SQL query
select 'drop table '||table_name||' cascade constraints;' from user_tables;

2. Run the SQL query generated after the 1st step above.