Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: delete cascade & trigger
mitt wrote:
> Hi,
>
> I have a table with an on-delete-cascade foreign key;
> in the row-level delete trigger I need to know, whether it fired because
> of a delete command on the table itself or if it was due to a
> "recursive" delete on the (grand-)father table;
>
> is there a way to accomplish this (in version >=8.1.7.4)?
> I know that this need hints at bad application design, but...;
>
> THX
It more than hints. But more importantly ... why? What difference does it
make? The answer to this question is not just rhetorical ... but may point
to the solution.
My instinct is that you have two entities performing the same task. Drop one of them: I'd modify the foreign key.
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Wed Jul 30 2003 - 10:35:30 CDT