Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger Questions

Re: Trigger Questions

From: Ton van de Ven <ton_at_thenewplanet.com>
Date: Wed, 27 May 1998 10:29:49 +0200
Message-ID: <356BCEFD.41C6@thenewplanet.com>


Hi Jimmy,

You could try the following piece of code. I did not check it though!

CREATE TRIGGER trigme
AFTER UPDATE OR INSERT ON emp
BEGIN
  IF UPDATING THEN
    IF :new.A<>:old.A or :new.B<>old.B THEN

        <ACTION>
    END IF;
  END IF;
  IF INSERTING THEN
    <ACTION>
  END IF;
END; Bye,
Ton

Jimmy wrote:
>
> Hello all,
>
> I want to create a trigger. The trigger is fired when column A or
> column B is modified or a record newly insert into table T. Is this
> possible? And how to do this?
> Moreover, if both column A and column B values are changed, how can I
> prevent the trigger fired twice?
>
> THanks,
> Jimmy
Received on Wed May 27 1998 - 03:29:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US