What is difference between TRUNCATE and DELETE statement

Answer Posted / archana motagi

Both the operations can be rolled back.The difference is,
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.

Is This Answer Correct ?    17 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will be query used to get the list of triggers in a database?

552


How sql server enhances scalability of the database system?

592


What is the purpose of indexing?

599


What is a hint?

582


How to enforce security in sql server? : sql server security

624






What are the operating modes in which database mirroring runs?

611


How do I know if localdb is running?

519


Explain triggers in sql?

558


Can a table be created inside a trigger?

568


Do you know how to make remote connection in database?

555


How display code or Text of Stored Procedure using Sql query in Sql Server ?

613


What is collation sensitivity? Explain different types.

549


Difference between drill down and drill through report.

547


what is bit datatype? : Sql server database administration

508


What is query optimizer in sql server?

553