Difference Between Truncate Table and Delete Table Command in SQL Server?

 Posted by Lakhangarg on 8/25/2009 | Category: Sql Server Interview questions | Views: 7985
Answer:

In case of Delete Statement Log is maintained. while in case of truncate command log is not maintained for each row, so we can't rollback the data in case of truncate table command.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Pandians on: 8/27/2009
Hi
According to your answer of "Difference Between Truncate Table and Delete Table Command in SQL Server ?"

"In case of Delete Statement Log is maintained. while in case of truncate command log is not maintained for each row, so we can't rollback the data in case of truncate table command."

Pl change the answer as...
Truncate command will NEVER LOG any transactions... But you saying that "truncate command log is not maintained for each row".

Cheers
Posted by: Kapil.j.dhokai on: 9/21/2009
another Difference are:

--> Truncate Table is faster than Delete Table,
--> Delete table accept where Clause.
--> Truncate Table reset identity column.
Posted by: Vivekjj on: 10/5/2012 | Points: 10
Truncate Table is faster than Delete Table,
Truncate delete all the records from the table

--> Delete command is used to delete particular records or whole records from the table

Login to post response