Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




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.

DROP

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.

Share this article   |    Print    |    Article read by 1128 times
Author:
Rohit kakria
I am software developer
Related Articles:
Related Interview Questions: No related interview question