Several methods for Oracle to delete tables

Source: Internet
Author: User

drop table books, the instruction will put the tables in the Recycle Bin,

With Flashback table "Bin$1oiy3qm/qjubov1bwbuogw==$0" to before drop; will be able to recover.

Delete tables: drop table books purge; is to bypass the Recycle Bin, thoroughly remove the suggestion you first purge recyclebin;

Clears the Recycle Bin of the current user without affecting other users ' Recycle Bin or purge table name;

Clears the specified table in the Recycle Bin

Text: Delete the name of the table (record and structure) Delete ———— truncate ———— drop Delete (delete the statement recorded in the data table)

DELETE from table name WHERE condition;

Note: Deleting a record does not release the block table space that is occupied in Oracle. It only marks those chunks of data that have been deleted as unused.

If you really want to delete all the records in a large table, you can use the TRUNCATE command,

It frees up the data block table space used by TRUNCATE table table name; This action is not fallback.

The same point truncate and delete without a WHERE clause, and drop deletes the data in the table

Note: Delete In this case refers to the DELETE statement without a WHERE clause

Different points: 1. Truncate and delete only delete data without deleting the structure of the table (definition)

The drop statement will delete the structure of the table that is dependent on the constraint (constrain), trigger (trigger), index (indexed);

Stored procedures/functions that depend on the table are preserved, but become invalid states.


Several methods for Oracle to delete tables

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.