How to Drop an Oracle Table

Drop a table without constraints

SQL> DROP TABLE tablename;

Drop a table with constraints

Oracle may not permit deletion of tables with constraints. Example:

SQL> create table A(
   i number primary key
);

SQL> create table B(
   n number,
   foreign key (n) references A
);

SQL> drop table A;

In this case, B is defined to have a relationship with A, so we can't simply delete table A, because that would violate the foreign key constraint defined in B. To force the deletion of table A, in spite of the constraints, we use the following:

SQL> drop table A cascade constraints;