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 does ss stand for sexually?

582


What are the advantages of having an index on the sql server?

540


Define inner join in sql server joins?

531


What is normalization and denormalization in sql server?

535


Can sql server be linked with other servers like oracle?

523






Explain about unique identifier data type in sql server?

512


What is difference between aggregate and analytic function?

481


What is cube dimension? : sql server analysis services, ssas

534


Tell about MOM Tool(Microsoft Operator Manager)?

1411


Define Unique Key?

592


What is store procedure? How do they work?

575


What is ssrs?

97


What is buffer cash and log cache in sql server?

593


How raid can influence database performance?

568


Is t sql the same as sql server?

513