Differences between drop, delete and truncate in oracle

Source: Internet
Author: User


The differences between drop, delete, and truncate in oracle are described as follows:
1. Both delete and truncate can delete the data in the table. However, compared with drop, the former only deletes the data and does not change the table structure. The latter also deletes the table structure; www.2cto.com 2. truncate has much higher performance than delete data,
The specific reason is: when the delete statement is used, the system processes records in the table one by one. before deleting rows from the table, record related delete operations and column values in the Delete row in the transaction processing log so that you can use the transaction processing log to recover data when the deletion fails. The truncate statement is used to delete all data pages related to the table at one time. In addition, the truncate table statement does not update the transaction processing log. After the data is deleted from the table using the truncate table statement, you cannot use the rollback command to cancel row deletion. Honeybinshun

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.