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

what is insert all statement in sql

5533


HI ALL, CAN ANYONE TELL ME THE DIFFERENCES BETWEEN SQL CLUSTURS,MSQL CLUSTERS,ORACLE CLUSTERS.......THANKS IN ADVANCE

1797


What is meant by recursive hints in oracle?

624


Is oracle an operator?

538


Differentiate between pre-select and pre-query?

631






Explain the use of consistent option in exp command.

556


How to define a variable to match a table column data type?

586


How to open and close an explicit cursor in oracle?

583


How to define a sub function?

676


how do we code triggers , store procedure , Performance tuning and indexing in a Java Project? Pls kindly get me the perfect answer with the code for each....thank you in advance............pls any body kindly help me soon as possible....

1596


what are archived logs?

1721


Explain oracle instance.

688


Explain enable novalidate constraint.

603


What are a cluster and non-cluster index?

582


What is dynamic proxy?

556