Set Null constraints in Oracle 8.0.5?????

From: Carole Darche <cdarche_at_ispalliance.net>
Date: Thu, 24 Feb 2000 23:02:01 -0500
Message-ID: <38B5FEB9.570444BC_at_ispalliance.net>



[Quoted] Hi all,

[Quoted] 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 Fri Feb 25 2000 - 05:02:01 CET

Original text of this message