Showing posts with label DELETE Vs TRUNCATE Vs DROP. Show all posts
Showing posts with label DELETE Vs TRUNCATE Vs DROP. Show all posts

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