From: rvalstar@aol.com (RValstar)
Subject: Re: SQL statement for Deleting
Date: 1996/07/28
Message-ID: <4tfr5a$mql@newsbf02.news.aol.com>#1/1
sender: root@newsbf02.news.aol.com
references: <31F800A3.3BDD@evitech.evitech.fi>
organization: America Online, Inc. (1-800-827-6364)
newsgroups: comp.databases.oracle



change the foreign key to:

where foreign key (login) references users (login) on delete cascade;

Rick

In article <31F800A3.3BDD@evitech.evitech.fi>, Mikko Rusama
<mikkohr@evitech.evitech.fi> writes:

>I have created two databases USERS and ORDER:
> 
>USERS have the following tables:
>login , primary key
>fullname
>num
>
>and the ORDER has:
>login
>orderno
>where foreign key(login) references users
>
>So ORDER is dependent on the USERS database
>When I try to delete from the USERS database user which exists also in
>the HOBBBY, error message : ORA-02292: integrity constraint violated -
>child record found.
>
>So I have to delete that particular user from the HOBBY database in
>order to delete it from the USERS database.
>
>Is there  SQL statement that also deletes particular user from all the
>child databases.
>
>Thanks for help!
>
>



