What is the difference between TRUNCATE and DELETE commands?

 Posted by Abhisek on 1/21/2010 | Category: Sql Server Interview questions | Views: 2510

1.TRUNCATE is a DDL command whereas DELETE is a DML command.
2.DELETE operation can be rolled back, but TRUNCATE operation cannot be rolled back.
3.WHERE can be used with DELETE and not with TRUNCATE.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Setahamid on: 1/21/2010
Others differences are :

Truncate resets identity while Delete does not .
Truncate can not activate trigger while delete activate trigger
Posted by: Abhisek on: 1/21/2010
Thanks Setahamid for your response.

Login to post response