Sometimes, you will have to drop all tables in your Tablespace in the Oracle database. In such cases, here is an easy way to do it.

Run the following command:

select 'drop table ', table_name, 'cascade constraints;' from user_tables;
Code language: JavaScript (javascript)

The above SQL command will return scripts to drop tables existing in your Oracle database tablespace.

Copy the output of the above SQL command as a script and run it.

Doing so will drop all of your tables in your tablespace.

Leave a Reply

Scroll to Top