Delete , Truncate , Drop Transaction in Oracle
Mohamed Fayez
Integration Lead | Solutions Architect | Open Banking API Innovation & Delivery
DELETE is DML operation used to remove row from Table. we can commit or rollback after delete .
TRUNCATE is DDL operation used to remove all row from Table .we can`t rollback this operation
DELETE is slower, TRUNCATE is faster. Why?
DELETE must read the records, check constraints, update the block, update indexes, and generate redo/undo. All of that takes time.
TRUNCATE simply adjusts a pointer in the database for the table (the High Water Mark) and poof! the data is gone.
DROP is DDL operation used to delete table from DB. We can`t rollback this operation.