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

Home -> Community -> Usenet -> c.d.o.server -> Re: Delete Rules

Re: Delete Rules

From: George Eastlick <georgee_at_airmail.net>
Date: Fri, 15 Oct 1999 17:45:53 -0500
Message-ID: <BDF99559AB282D57.91A782F23AA15EAD.7F9CB429A8DCFC0D@lp.airnews.net>


Delete from cinemas where .... cascade;

Ermina Chatzipavli <echatzip_at_filmnet.gr> wrote in message news:380715CA.19F3EE0C_at_filmnet.gr...
> Dear all,
>
> I have the following question:
>
> One table contains cinemas (cinema_id, .......), another one movies
> (movie_id,....) and the third one foreign keys (cinema_id, movie_id),
> since we have a many to many relationship (one cinema may play several
> movies, and one movie can be played in several cinemas as well).
>
> Now, I want to be able to delete all the records from the first or the
> second table but an error appears: integrity constraint violated -
> child record found. Is there a way to be able to delete a cinema or a
> movie and have all the related records in the third table deleted as
> well?
>
> I know there are some delete rules (cascade, restrict) but I don't know
> how to use them. (I only used them when I created my database schema in
> ERwin).
>
> Thank you in advance,
>
> Ermina
>
Received on Fri Oct 15 1999 - 17:45:53 CDT

Original text of this message

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