This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12823|Reply: 0

[Source] What is the difference between truncate and delete in pl/sql

[Copy link]
Posted on 3/22/2015 8:58:17 AM | | |
TRUNCATE TABLE is functionally identical to a DELETE statement without a WHERE clause: both delete all rows in the table. However, TRUNCATE TABLE is faster than DELETE and uses fewer system and transaction log resources.   DELETE statement deletes one row at a time and records one item in the transaction log for each row deleted.
TRUNCATE TABLE deletes data by releasing the data pages used to store the table data, and only records the release of the pages in the transaction log.
TRUNCATE, DELETE, DROP are put together to compare:
TRUNCATE TABLE: Deletes content, frees up space but does not delete definitions.
DELETE TABLE: Deleting content does not delete the definition or free up space.
DROP TABLE: Delete content and definitions to free up space.

Using truncate to delete rows in a table is not possible to roll back!




Previous:SqlServer naming convention
Next:Wusoft intranet 1433 weak password IP, can elevate the control of the host, and attach a scanning tool
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com