Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Delete Rules
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 - 06:53:46 CDT
![]() |
![]() |