Difference between DELETE and TRUNCATE commands ?

 Posted by Chikul on 12/21/2009 | Category: Sql Server Interview questions | Views: 2341

TRUNCATE TABLE is faster that DELETE TABLE and uses fewer system and transaction log resources.
Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command.
Delete command removes the rows from a table based on the condition that we provide with a WHERE clause.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Rickeybglr on: 7/14/2011 | Points: 10
using DELETE command you can rollback or recover your data after delete operation. but u can't do the same by using truncate
Posted by: Jpchoudhari on: 7/14/2011 | Points: 10

In case of TRUNCATE ,Trigger doesn't get fired.But in DML commands like DELETE .Trigger get fired.
TRUNCATE TABLE resets the IDENTITY column to its base value. The DELETE command doesn't do this.

Kind Regards,

Login to post response