Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger self inspection (am I inserting or updating?)
Hi Morten,
Yes it is.
In your code you can specify IF DELETING THEN blah ... ELSIF INSERTING THEN blah ...
You can also specify UPDATING and UPDATING ('column_name') to the column level.
Cheers
Richard
Morten wrote:
>
> Hi. Given an 'AFTER INSERT OR UPDATE' trigger, is it possible
> within the trigger body, to determine whether it's been
> triggered by an insert operation, or an update operation?
>
> I could create 2 triggers, but they are rather large triggers
> and the update trigger has only 1 line that does not appear in
> the insert trigger.
>
> Thanks,
>
> Morten
Received on Wed Aug 14 2002 - 07:43:27 CDT