Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> temp. undo delete in trigger / cascade delete via trigger..
hi,
i would like to implement a cascade delete functionality in our database which should be controllable e.g. normally it should be disabled. so a solution ala 'on delete cascade' is not really what we want.
the referential integrity is enforced declaratively via 'references ...'
using the emp/dep-example:
in a before delete row-trigger i cannot delete the depending records with 'delete emp where deptno=:old.deptno' because of ora-4094, collecting the :old.deptnos in a pl/sql table as the update-cascade-package does it, doesn't help either as the delete fails because of the child-records in emp. insert into dep (deptno) values(:old.deptno) of course gives an ora-4091. how can i get out of this circle?
ciao, jan
rs&p-Dossier: Software zur Erstellung technischer Dokumentationen
und Schriftgutes in Verwaltung und Industrie. Received on Fri May 26 2000 - 00:00:00 CDT