Register   |  Login
You are hereHome
 Article Details
Difference between DELETE and TRUNCATE

1.       DELETE and TRUNCATE removes rows or records from the table.

2.       DELETE can be used with WHERE clause. But not the TRUNCATE.

3.       DELETE can be rolled back, but not TRUNCATE

4.       DELETE raises TRIGGERS, but not the TRUNCATE

5.       DELETE does not reset the IDENTITY column


Written By: Kumaravel
Date Posted: 1/12/2009
Number of Views: 725


Comments
Kum 's Says:
2/22/2009 10:28:49 AM

Yes... thanks for the additions

Keerthi Says:
2/17/2009 8:00:56 AM

Hi Kumaravel,

A couple of additions.......

1. Unlike DELETE,TRUNCATE does not log individual row deletions(transaction logs).Hence is much faster.
2. DELETE is DML command and TRUNCATE is DDL command since it resets the identity column.

You must be logged in to submit a comment.

Return