Differencr Between DELETE and TRUNCATE?

Answer Posted / rajesh bhawsar

delete command, delete row by row and same time it makes an
entry in transaction log
while truncate remove the referance of respective
page/extent and doesn't make any entry in transaction log
truncate is faster then delete.
in case of truncate seed value (auto increment column) reset
to default unlike delete.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a unique index be created on a column, which contains null?

534


explain what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration

476


What is pessimistic concurrency?

548


What is update locks?

518


How to create a dynamic cursor with the dynamic option?

557






How to add code to the existing article (using improve article)?

602


Indexes are updated automatically is the full-text index also updated automatically?

633


It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio

562


what's new in sql server 2016?

570


What are the disadvantages of using querystrings to send data from one page to another?

598


what are the different stages of Report Processing?

97


How do I run a trace in sql server?

517


List few advantages of stored procedure.

549


What is buffer cash in sql server?

619


Can I delete event logs?

550