DROP TABLE in Oracle

previous-topic-oraclemine                                                                                                   next-topic-oraclemine

Drop table in Oracle removes the table to the recycle bin or entirely from Oracle database. It is classified as DDL (Data Definition Language) statement by Oracle.

FLASHBACK TABLE statement released from Oracle 10g onward recovers the dropped table.

DROP TABLE

Syntax

DROP TABLE table_name [CASCADE CONSTRAINTS] [PURGE];
Parameters Explanation

table_name

  • Table name to drop

CASCADE CONSTRAINTS

All the referential integrity constraints referring to primary and unique constraints are dropped If CASCADE CONSTRAINTS is specified.

This clause is optional in drop table statement.

PURGE

Specify PURGE to drop the table entirely from Oracle database.

Recovery of the table is not possible once it is dropped using the PURGE option.

PURGE is optional in drop table statement.

Example

DROP TABLE employees;

This query will delete table employees from database and moves it to recycle bin.

DROP TABLE employees PURGE;

Above query will remove the table employees from database.

I hope you like the page and find it useful. We highly appreciate comments and feedback.

You can also Subscribe here to stay updated on latest posts of OracleMine.com.

previous-topic-oraclemine                                                                                                   next-topic-oraclemine

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.