Re: Set Null constraints in Oracle 8.0.5?????

From: Yang <yg.yang_at_wanadoo.fr>
Date: Sat, 26 Feb 2000 23:20:43 +0100
Message-ID: <899jhf$lf0$1_at_wanadoo.fr>


hi,
try the option "on delete cascade" when you add the constraintes. HTH.
Yang

Carole Darche wrote in message <38B5FEB9.570444BC_at_ispalliance.net>...
>Hi all,
>
>Our D.B.A. is having a very strange problem with foreign keys in Oracle
>8.0.5.
>
>The object is to create a set null constraint, so she followed the
>following procedure
>
>create father and child tables
>
>desc father;
>Column Name Null? Type
>------------------------------ -------- ----
>FATHER_ID NOT NULL NUMBER
>BIDON VARCHAR2(2)
>
>desc child;
>Column Name Null? Type
>------------------------------ -------- ----
>CHILD_ID NOT NULL NUMBER
>FATHER_ID NUMBER
>TEXT VARCHAR2(2)
>
>alter table child
>add constraint fk1_child foreign key (father_id) references father
>(father_id);
>
>delete from father where father_id=1;
>ORA-02292: integrity constraint (AMSUSER.FK1_CHILD) violated - child
>record found
>
>How to work our way arround this, How oracle is handling the set null
>constraints?????
>
>Please reply to the following email address: cdarche_at_america.net Or
>belbagri_at_america.net
>
>Thanks for your help
>
>
Received on Sat Feb 26 2000 - 23:20:43 CET

Original text of this message