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: Sequence

Re: Sequence

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 2000/01/31
Message-ID: <8v5b9skgddoe2esjrt5lu3j6i34o32jrft@4ax.com>#1/1

A copy of this was sent to "Gary Knopp" <gknopp_at_ascend.com> (if that email address didn't require changing) On Mon, 31 Jan 2000 08:42:56 -0500, you wrote:

>
>Is there away to assign a sequence number in a
>a before insert trigger event? I can't seem to get
>this to work properly.
>
>Thanks
>
>
>
>
>
>

you cannot assign a sequence, you must select it into a variable. eg:

select my_seq.nextval into :new.id from dual;

-- 
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Mon Jan 31 2000 - 00:00:00 CST

Original text of this message

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