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:
> 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