Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Drop Table with Foreign Constraints & Indexes
Ste wrote:
> Hi,
>
> 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?
>
> Thanks for any comments.
>
> Ste
Two suggestions:
Hint: according to the docco "Specify CASCADE CONSTRAINTS to drop all referential integrity constraints that refer to primary and unique keys in the dropped table. If you omit this clause, and such referential integrity constraints exist, then Oracle returns an error and does not drop the table."
In other wrds, if you don't want to implicitly drop children tables, don't include CASCADE CONSTRAINTS ... OR drop the associated constraint.
/Hans Received on Sat Sep 25 2004 - 19:48:30 CDT