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

How do I start sql server 2016?

688


What are key, name and value columns of an attribute? : sql server analysis services, ssas

766


How to filter records of table in SQL SERVER?

787


What is transact-sql language?

755


Define synonym?

904






Do you know what are the differences between lost updates and uncommitted dependencies?

736


Why de-normalization required?

737


What do we have to check in database testing?

766


What do you do in data exploration

720


What are the filtered indexes?

781


How to write a query with an inner join in ms sql server?

753


What is the difference between osql and query analyzer?

723


What do you understand by coalesce in sql server?

726


What is a full text index?

669


How do I edit a stored procedure in sql server?

681