Cloud Training (Online)




Difference between DELETE and TRUNCATE command in SQL Server

Below are few points that differentiate the DELETE and TRUNCATE command.

Sl. No.

DELETE

TRUNCATE


1This removes the rows one at a time and then records it in the transaction log for each of those deleted row.This used fewer transaction log than delete and is faster
2This can be used with or without a Where clauseThis removes all rows from a table
3Can be rolled back.Cannot be rolled back
4It is a DML Command.It is a DDL Command.
5When an Identity is used , it is not resetIdentity is reset