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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: TRIGGERS

Re: TRIGGERS

From: Vitalis Jerome <vitalisman_at_gmail.com>
Date: Wed, 18 May 2005 16:37:40 +0200
Message-ID: <68b1285505051807373c49270b@mail.gmail.com>


On 5/18/05, Scott, Jim H - VSCM <scott.jim_at_vectorscm.com> wrote:
> That's good, but this flavor uses less resources (the evaluation is
> pushed up out of the pl/sql block):

>=20

> SQL> create trigger trig_t before insert on t for each row
> 2 when (:new.a is null)
> 3 begin
> 4 select seq_a.nextval into :new.a from dual;
> 5 end;
> 7 /

Hi Jim,

I see what you meant, but...

SQL> drop trigger trig_t;

Trigger dropped.

SQL> create trigger trig_t before insert on t for each row when (:new.a is null)
begin
select seq_a.nextval into :new.a from dual; end;
/ 2 3 4 5 6
when (:new.a is null)

      *
ERROR at line 2:
ORA-25000: invalid use of bind variable in trigger WHEN clause

--
http://www.freelists.org/webpage/oracle-l
Received on Wed May 18 2005 - 10:43:55 CDT

Original text of this message

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