Methods for Oracle to delete all tables under the current user

Source: Internet
Author: User

1, if there is a Plsql client, you can use the user login, select all the table right-click Drop.

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

[SQL]View Plaincopy
    1. Drop user user_name cascade;

Add the cascade can delete the user data.


Delete and then create the user.

[SQL]View Plaincopy
    1. --Create User
    2. Create user username profile default identified by password default
    3. Tablespace tablespace name temporary tablespace TEMP account unlock;
[SQL]View Plaincopy
    1. --Authorization
    2. Grant DBA to user name;
    3. Grant Connect,resource to user name;

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

[SQL]View Plaincopy
    1. Select ' drop table ' | | table_name| |   '; '
    2. From Cat
    3. where table_type=' table '


TABLE_NAME is the name of the table to query, "the content is to do character stitching

A batch of SQL statements to delete the table will be output, and the SQL statements will be executed.

Methods for Oracle to delete all tables under the current user

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.