diff between DELETE and TRUNCATE?.

Answer Posted / kumar

DELETE TABLE is a logged operation, so the deletion of each
row gets logged in the transaction log, which makes it
slow.
TRUNCATE TABLE also deletes all the rows in a table, but it
won't log the deletion of each row, instead it logs the
deallocation of the data pages of the table, which makes it
faster.

The records deleted through DELETE can be roll backed.
The records deleted through TRUNCATE can't be roll back.

If we are using TRUNCATE ina Transaction then only we can
do the roll back else not.

Both will delete the data but not the stucture of the table.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to convert character types to numeric types?

565


Explain implicit cursor.

546


What is user managed backup in Oracle?

602


What is a snapshot log?

557


What are the advantages of oracle?

541






What happens if the update subquery returns multiple rows?

596


How to assign a table row to a record variable?

571


What is Undo Management Advisor in Oracle?

601


How to delete all rows a table in oracle?

615


How to best split csv strings in oracle 9i?

576


How do I call oracle stored procedures that take no parameters?

555


What is the quickest way to fetch the data from a table?

555


How do I find the database name in oracle?

593


Explain rename?

541


how to do daily transactions with out sql* loader control file regesterd in apps?

1213