Monday 25 July 2011

DELETE Vs TRUNCATE Vs DROP

DELETE
·         It’s a DML command
·         It can be used to delete all or specifed number of records
·         We can use WHERE clause with DELETE
·         We can do ROLLBACK
·         Oracle server do not free the allocated memory after DELETE operation
TRUNCATE
·         It’s a DDL command
·         It can be used to delete all records
·         We can not use WHERE clause with TRUNCATE
·         We can not do ROLLBACK, since it is a DDL command
·         Oracle server free the allocated  memory after TRUNCATE operation
DROP
·         It’s a DDL command
·         It can be used to delete all records along with table structure
·         We can not use WHERE clause with DROP
·         We can not do ROLLBACK, since it is a DDL command
·         Oracle server free the allocated memory after DROP operation


2 comments:

  1. 11 main Differences between Delete and Truncate in sql server
    http://www.webcodeexpert.com/2013/03/difference-between-delete-and-truncate.html

    ReplyDelete
  2. Thanks... It was very helpfull.

    ReplyDelete