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: HELP ! : sequence nextval

Re: HELP ! : sequence nextval

From: Michail Brzitwa <michail_at_brzitwa.de>
Date: Thu, 17 Apr 2003 17:07:12 +0200
Message-ID: <pan.2003.04.17.17.07.11.735138.1418@brzitwa.de>


On Thu, 17 Apr 2003 16:33:46 +0200, Brian wrote:
> I rebuilt a server & reinstalled the DB & many of the sequences were
> renewed back to thier initial value (1). I need to get them back up to
> the values they need to be.

Please have a look at the Oracle Server Documentation for the "CREATE SEQUENCE" sql command:

SQL> create sequence testseq minvalue 100 maxvalue 999 start with 998 cycle;

Sequence created.

SQL> select testseq.nextval from dual;

   NEXTVAL


       998

SQL> select testseq.nextval from dual;

   NEXTVAL


       999

SQL> select testseq.nextval from dual;

   NEXTVAL


       100

-- 
Michail Brzitwa           <michail_at_brzitwa.de>            +49-511-343215
Received on Thu Apr 17 2003 - 10:07:12 CDT

Original text of this message

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