Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger syntax
it is :new.id (not new.id)
-- AMARENDRA B NETTEM ORACLE CONSULTANT WHITTMAN-HART INC., CHICAGO (http://www.iit.edu/~nettama) David Vodnansky <vodnansky_at_icl.cz> wrote in article <32F074C3.15F3_at_icl.cz>...Received on Fri Jan 31 1997 - 00:00:00 CST
> Hi all,
>
> I have problems with trigger syntax in Oracle (I usually use Interbase).
> Simple example :
>
> create table adresy (id number(3,0),text varchar2(25));
> create sequence gen_adresaid ......;
>
> CREATE TRIGGER gen_adr_id
> BEFORE INSERT ON ADRESY
> FOR EACH ROW
> BEGIN
> new.id:=gen_adresaid.nextval; <--- this line is wrong, why ?
> end;
>
> Thanks for advice.
>
> -------------------
> David Vodnansky
> ICL Czech republic
> vodnansky_at_icl.cz
> -------------------
>
![]() |
![]() |