Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP ! : sequence nextval
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-343215Received on Thu Apr 17 2003 - 10:07:12 CDT