Home > DeveloperSection > Interviews > What are difference between truncate and delete?

Posted on    November-20-2014 11:12 PM

 MSSQL Server MSSQL Server 
 1 Answer(s)
  956  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    November-21-2014 12:12 AM

1) Delete keep the lock over each row where Truncate keeps the lock on table not on all the row.

2) Counter of the Identity column is reset in Truncate where it is not reset in Delete.

3) Trigger is not fired in Truncate where as trigger is fired in Delete.

4) In TRUNCATE we cannot rollback.

5) In DELETE we can rollback

Don't want to miss updates? Please click the below button!

Follow MindStick