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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Row-Trigger question (Oracle 8)

Re: Row-Trigger question (Oracle 8)

From: Richard Kuhler <noone_at_nowhere.com>
Date: Thu, 11 Nov 2004 18:48:03 GMT
Message-ID: <DtOkd.41179$jo2.16377@twister.socal.rr.com>


Michael Kreitmann wrote:
> If I define the trigger "FOR EACH ROW", the trigger will be fired n-times
> if the firing statement will hit n records. Is there any unique ID or hash-code
> or anything else, that is equal for all of these n executions of this trigger
> (and only for these n executions ? - the next statement firing the trigger
> must produce a new (unique) ID ...)

There's probably something you could put together from state information that would be unique. However, you could just create a sequence and call MY_SEQ.NEXTVAL in a statement level trigger. Then use MY_SEQ.CURRVAL in the FOR EACH ROW trigger.

--
Richard Kuhler
Received on Thu Nov 11 2004 - 12:48:03 CST

Original text of this message

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