Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: can I use sequence in trigger ?
Hy Andrew
thanks a lot for the fast reply.
This way it worked.
ronald
Andrew Velichko wrote:
> Hi Ronald! > > Yes, you can use sequence in triggers. > The matter is that in PL/SQL you can't just assign sequence.nextval to > a variable. The following should work fine: >
> > declare > n number; >
> > select seq_refno_ein.nextval into n from dual; > :new.refno :=n;
>> --:new.refno :=seq_refno_ein.nextval;
>> end;
>> /
> > > Andrew Velichko > Brainbench MVP for Oracle Developer 2000 > http://www.brainbench.com > -------------------------------------------------------------- > > > "Ronald Mohr" <mail_at_ronald-mohr.de> wrote in message > news:3A4BA6E5.6070108_at_ronald-mohr.de... >
![]() |
![]() |