top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Difference between TRUNCATE, DELETE and DROP commands?

+3 votes
632 views
Difference between TRUNCATE, DELETE and DROP commands?
posted Oct 27, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

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. After performing a delete operation you need to COMMIT or rollback the transaction to make the change permanent or to undo it. Note that this operation will cause all delete triggers on the table to fire. but TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster and doesn't use as much undo space as a delete.Drop command drops the table structure as well as data.

answer Nov 5, 2014 by Kshitij Maloo
...