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

Home -> Community -> Usenet -> c.d.o.misc -> Re: CREATING SEQUENCES - HELP PLEASE

Re: CREATING SEQUENCES - HELP PLEASE

From: Sunder Rajan <rajan_at_t-iii.com>
Date: 1997/10/23
Message-ID: <344FD8E8.E5258314@t-iii.com>#1/1

Though This is the Most Obvious Solution, there are drawbacks. What if I do a Bulk Insert of say, a 1000 Records and then Rollback ? The Sequence Number would greatly differ.

Sunder Rajan.

Ed Bradt wrote:

> Javier Riera wrote:
> >
> > I am trying to build a table where the identifier must
 autocalculates
> > its own value. Has the sequence object this property?
> > I created a secuence as:
> >
> > CREATE SEQUENCE miSeq
> > INCREMENT BY 1
> > START WITH 0
> > MINVALUE 0
> > MAXVALUE 9999999
> > NOCYCLE
> > CACHE 20
> > NOORDER
> > ;
> >
> > How can I assign this sequence to my table's identifier?
> >
> > Thanks.
>
> create a before insert triger that assigns miSeq.nextval as the values
>
> of your column.
> Ed Bradt
Received on Thu Oct 23 1997 - 00:00:00 CDT

Original text of this message

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