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

Hi I am Paras.

Thanks for stopping by at OracleMine.com. Speaking about my brief introduction, I work for a multinational organisation in Oracle related technologies. Being an avid blogger, I would like to inform you about my productivity and motivational blog XpressPlanet.com. Speaking of OracleMine.com, I will try my best to share knowledge on technologies in as simple and understandable manner as possible. You can also contribute your knowledge on OracleMine by writing to us at hioraclemine@gmail.com. Again I appreciate your visit. Hope to see you again and again!

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.