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 archive log in Oracle?

601


What is the relationship among database, tablespace and data file?

542


What is the difference between "as" and "is" in an oracle stored procedure?

540


What is oracle database client?

557


I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database

1633






please explain.. DB architecture ...

1566


Explain temporal data types in oracle

609


what is normalisation?what are its uses?

1763


What are the four Oracle system processes that must always be up and running for the database to be useable?

595


What would you do with an in-doubt distributed transaction?

1470


How to create id with auto_increment on oracle?

547


What language does oracle use?

598


How to start your 10g xe server from command line?

548


how to use select statement as formal parameter in procedure specification?(someone said that using string) ex:-procedure(a in number,select ename from emp ) i am asking syntax like this?

1531


What is raw datatype?

595