Re: Trigger: How to identify which event fire the trigger.

From: Aparna <bliss_is_ignorance_at_hotmail.com>
Date: Mon, 6 Aug 2001 20:05:05 +0800
Message-ID: <3b6e88d6.0_at_news.tm.net.my>


hi,

[Quoted] you can check the event by using conditional predicates INSERTING, DELETING, UPDATING e.g.
create or replace trigger trigger_name
after insert or update or delete
on
table_name
begin

[Quoted]     if INSERTING then

        do whatever it is u want
    elsif UPDATING then

        do whatever it is u want
    elsif DELETING then

        do whatever it is u want
    end if;
end;
/

hope this helps...

regards,
aparna
"EMDI" <di.pasquale_at_home.com> wrote in message news:m_pb7.12740$DW1.2384561_at_news1.rdc1.mb.home.com...
> Hi Guys.
> I need to generate a trigger with almost the same logic for Insert, UPdate
> and Delete however I need to know which event fire the trigger in order to
> adjust the code and avoid to create three triggers.
>
> Could someone please tell me in wich variable I might receive this
> information.
> Thanks
>
> --
>
>
> ------------------------------------
> Make Unlimited phone calls from your PC to ANY phone in the World!
> http://www.eboom.com/free/
>
>
Received on Mon Aug 06 2001 - 14:05:05 CEST

Original text of this message