Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how to determine Delete-state in a trigger "BEFORE DELETE OR UPDATE"
"Dietmar Brueckmann" <Dietmar.Brueckmann_at_lycos.de> wrote in message
news:2raq1nF17a15oU1_at_uni-berlin.de...
> Hi,
>
> I've written 2 trigger "BEFORE DELETE" and "BEFORE UPDATE" to save the old
> record in an other table.
> I want to combine them in one, because they are very similiar.
> But there are little differences. The insert statement sets a value
> WHAT_DONE to "D" in the DELETE-Trigger and to "U" for the UPDATE-Trigger.
> I would like to have an IF-statement like this
>
> IF trigger_operation = tropDelete THEN
> ....
> END IF;
>
> Is there any solution?
>
> Thanks and best regards
> Dietmar
>
>
BEGIN
IF INSERTING THEN
your code
ELSEIF UPDATING THEN
your other code
END IF;
HTH
Received on Tue Sep 21 2004 - 09:11:51 CDT