Difference between DELETE and TRUNCATE commands in SQL Server

Difference between DELETE and TRUNCATE commands in SQL Server.

DELETETRUNCATE
It is a DML command.It is a DDL command.
It can specify WHERE clause.It cannot specify WHERE clause.
It deletes specified data if where the condition exists.It removes all the data.
Rollback is possible.Rollback is not possible.
It is slow.It is fast.
It keeps logs.It does not keep any logs.
It is executed using a row lock, each row in the table is locked for deletion.It always locks the table and page, but not each row.
It activates a trigger.It cannot activate a trigger.
What are constraints in SQL Server?
Constraints enforce the data integrity to the database and protect columns of the table from unwanted values........
What is an index?
Indexes of SQL Server are similar to the indexes in books. They help SQL Server retrieve the data quicker.........
What is RAID?
RAID stands for Redundant Array of Inexpensive Disks. It provide fault tolerance to database servers........
Post your comment