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

Home -> Community -> Mailing Lists -> Oracle-L -> delete from table question

delete from table question

From: <dmeng_at_focal.com>
Date: Tue, 16 Jul 2002 10:33:29 -0800
Message-ID: <F001.004996C1.20020716103329@fatcity.com>


Hi All -
I am trying to delete from a table that has 24 child tables. Because the constraints are not 'cascade delete', I am hitting the following:

ORA-02292: integrity constraint (NVALET.FK_TOPOGROUPMEMBERNE2) violated - child
record found

If I want to go ahead and delete the child records as well, there seem to be 2 options:
1. Write a sql/plsql procedure to delete the child records first before each deleting each record from the parent table. 2. Recreate the constraints with 'cascade delete' and delete the records from parent table. After that recreate the constraints again without cascade delete.

Either option requires some work. Does anybody have a better idea? Also can anybody have a script to recreate all constraints to share?

TIA Dennis Meng
Database Administrator
Focal Communications Corp.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: dmeng_at_focal.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Jul 16 2002 - 13:33:29 CDT

Original text of this message

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