WHAT ARE DIFFERENCE BETWEEN TRUNCATE AND DELETE?

Sumit Kesarwani

Total Post:782

Points:3910
Posted by  Sumit Kesarwani
 1013  View(s)
Ratings:
Rate this:
  1. Sumit Kesarwani

    Post:782

    Points:3910
    What are difference between truncate and delete?

    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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!