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: <saropani_at_my-dejanews.com>
Date: Thu, 28 May 1998 02:35:06 GMT
Message-ID: <6kiigq$dpp$1@nnrp1.dejanews.com>


In article <356C1FBD.6195_at_comp.polyu.edu.hk>,   Jimmy <c6635500_at_comp.polyu.edu.hk> 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
>

Hi Jimmy,

I think you can do that using the following statement:

CREATE OR REPLACE TRIGGER ur_trgr BEFORE INSERT OR UPDATE OF colA, colB ON ur_table FOR EACH ROW

ur_plsql_block;

And note that the trigger is not executed twice.

Regards,
Saravanan
(saro_at_psoux141.sgp.hp.com)

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Wed May 27 1998 - 21:35:06 CDT

Original text of this message

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