Methods for Oracle to delete all tables under the current user

Source: Internet
Author: User

1. If you have permission to delete a user, you can:

Drop user user_name cascade;

Add the cascade can delete the user data.

Delete and then create the user.
--Create an administrator user
Create user username identified by password default tablespace space_data (tablespace name) temporary tablespace space_temp (temporal tablespace name);
--Authorization
Grant CONNECT,DBA to user name;
--Revision limits
ALTER user "username" QUOTA UNLIMITED on space_data (table space name);

--View all user objects
Select Uo.object_name,uo.object_type from user_objects uo where uo.object_type<> ' lobs ' ORDER by uo.object_type Desc

2, if you do not delete the user's rights, you can do:

Select ' Drop table ' | | table_name| | '; '
From Cat
Where table_type= ' table '

Will output a batch of SQL statements to delete the table, these SQL statements can be executed. (Requires permission to drop table)

Methods for Oracle to delete all tables under the current user

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.