Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Drop Table with Foreign Constraints & Indexes

Re: Drop Table with Foreign Constraints & Indexes

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Sat, 25 Sep 2004 08:50:02 +1000
Message-ID: <4155f6d8$0$10345$afc38c87@news.optusnet.com.au>


Ste wrote:

> I would like to seek help dropping a table with foreign keys being
> referenced to and referencing other table.    Do we disable constraints
> first before "drop table constraints cascade"?    Would dropping this
> table drop other foreign key referenced table too?

DROP TABLE DEPT CASCADE CONSTRAINTS; The 'cascade constraints' clause will do automatically the bit you would otherwise have to do manually: disable or drop the foreign key constraint.

The child table in the foreign key relationship can be dropped at any time without mentioning the constraints at all, because it's the business of creating orphans that is not allowed. You can create childless parents at any time without fuss.

Regards
HJR Received on Fri Sep 24 2004 - 17:50:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US