SIGN UP MEMBER LOGIN:
   
ARTICLE

What is the difference between Delete, Truncate and Drop in Oracle

Posted by Sapna Malik Articles | Oracle January 03, 2013
Difference between delete, truncate and drop command with the example in Oracle
Reader Level:

Difference between delete, truncate and drop command with the example in Oracle

Delete:

The delete command means delete the value of the table. We can delete one or more rows of the table. The delete is a data management language command (DML) and this command will be effect on the table value. We can use where clause and can be rollback. We can use undo space.

Example:

SQL> Delete from emp where id='90';

Truncate:

The truncate command means delete all rows of the table. The truncate is a data definition language (DDL) command and this command delete the all rows of the table. We can not use where clause and can not be rollback. We can not use undo space.

Example:

SQL> truncate table emp;

Drop:

The drop command means delete the table from the database. The drop command is a data definition language (DDL) command and this is a table oriented command. We can delete all rows and also the table definition, indexes, triggers and all storage parameters. The rollback is not possible. We can not use undo space.

Example:

SQL> drop table emp;

Login to add your contents and source code to this article
This Feature is Sponsored By
post comment
COMMENT USING
TRENDING UP