Oracle – Drop User Cascade

If you have user that owns objects and you want to drop the user then you have to use the Cascade keyword with your drop statement/command.

The Oracle DROP USER CASCADE command drops a user and all owned objects.

Without using DROP USER CASCADE you cannot delete the user that owns objects.

Example:

 Oracle - Drop User Cascade

Oracle – Drop User Cascade

First you try to drop the user without CASCADE then below error occurred because my_user user own the my_table object (as shown above)

Oracle - Drop User Cascade

Oracle – Drop User Cascade

But now use the cascade with DROP USER (as below)

Oracle - Drop User Cascade

Oracle – Drop User Cascade

I hope this will help you to understand the Drop User Cascade.

Note: In order to drop a user, you must have the Oracle DROP USER system privilege.