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: Passing an argument to a trigger?

Re: Passing an argument to a trigger?

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Sun, 14 Nov 2004 13:34:52 -0800
Message-ID: <1100468013.34162@yasure>


Ramon F Herrera wrote:

> This is my first trigger.
>
> I need the trigger to fire every time there is an
> INSERT in a table. That part works well, but I need
> to have access to the record that got inserted.
>
> It seems that the only way to achieve this is by
> using FOR EACH ROW and :new
>
> Is there any way to get the argument that I need
> _without_ using the "FOR EACH ROW" method?
>
> TIA,
>
> -Ramon

I don't think you understand what FOR EACH ROW means? It has to do with when the trigger is fired and when it is not fired.

To access each row you must use FOR EACH ROW. And to access the values inserted you must use the :NEW bind variable.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Sun Nov 14 2004 - 15:34:52 CST

Original text of this message

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