Database 11g

Monday, February 29, 2016

How to drop a table in oracle which are having Constraints





  • Oracle will not allow you to dropped the able when oracle table is configured with constraints.

           you will get  ORA-02449.


  • Apply Cascade Constraints option to drop the tables which are referenced by foreign  keys of other tables.


SQL> drop table finorders
           *
ERROR at line 1:
ORA-02449: unique/primary keys in table referenced by foreign keys


SQL> drop table finorders cascade constraints;

Table dropped.


Happy Learning.....

No comments:

Post a Comment