Xpode.com        Click here to Print this article.

Truncate, Delete & DROP

Truncate & Delete

1 The DELETE command is used to remove rows from a table. A WHERE clause can be used to only remove some rows. If no WHERE condition is specified, all rows will be removed.

TRUNCATE removes all rows from a table.

2 truncate is ddl command, delete is dml command.

3 Rollback of transaction is possible in DELETE operation (if delete is supported with Begin transaction, then roll back by using rollback transaction),
but not in truncate.

4 truncate is non-logged operation but delete is logged operation

5 TRUCATE is faster than delete.


The DROP command removes a table from the database. All the tables' rows, indexes and privileges will also be removed. No DML triggers will be fired. The operation cannot be rolled back.


Contributed by:
Rohit kakria
I am software developer

Resourse address on xpode.com

Click here to go on website