Message-Id: <10612.116433@fatcity.com> From: "Steve McClure" Date: Thu, 7 Sep 2000 11:28:54 -0700 Subject: Re: ALTER SEQUENCE NEXTVAL This is a multi-part message in MIME format. ------=_NextPart_000_0016_01C018BE.CE3E0DC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ALTER SEQUENCE NEXTVALLisa, When I have had need to do this I just dropped the sequence and = recreated it with the 'start with' value I required. Steve McClure ----- Original Message -----=20 From: Koivu, Lisa=20 To: Multiple recipients of list ORACLE-L=20 Sent: Thursday, September 07, 2000 6:30 AM Subject: ALTER SEQUENCE NEXTVAL I thought I saw someone refer to doing this yesterday on the list. I = swear I thought it was possible to alter a sequence to reset the nextval = to a number you choose, ex., set it back to 1. Turns out the = documentation doesn't state you can, and it errors out. Am I missing = something? I am writing a procedure to drop and recreate the sequence = instead.=20 1* alter sequence seq_gn_special_offers_id nextval =3D 1=20 SQL> /=20 alter sequence seq_gn_special_offers_id nextval =3D 1=20 *=20 ERROR at line 1:=20 ORA-02286: no options specified for ALTER SEQUENCE=20 SQL> alter sequence seq_gn_special_offers_id set nextval =3D 1;=20 alter sequence seq_gn_special_offers_id set nextval =3D 1=20 *=20 ERROR at line 1:=20 ORA-02286: no options specified for ALTER SEQUENCE=20 Lisa Rutland Koivu=20 Oracle Database Administrator (do I dare call myself that??)=20 Qode.com=20 4850 North State Road 7=20 Suite G104=20 Fort Lauderdale, FL 33319=20 V: 954.484.3191, x174=20 F: 954.484.2933=20 C: 954.658.5849=20 http://www.qode.com=20 "The information contained herein does not express the opinion or = position of Qode.com and cannot be attributed to or made binding upon = Qode.com." ------=_NextPart_000_0016_01C018BE.CE3E0DC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ALTER SEQUENCE NEXTVAL
Lisa,
 
When I have had need to do this I just = dropped the=20 sequence and recreated it with the 'start with' value I = required.
 
Steve McClure
----- Original Message -----
From:=20 Koivu, = Lisa
To: Multiple recipients of list = ORACLE-L=20
Sent: Thursday, September 07, = 2000 6:30=20 AM
Subject: ALTER SEQUENCE = NEXTVAL

I thought I saw someone refer to doing = this=20 yesterday on the list.  I swear I thought it was possible to = alter a=20 sequence to reset the nextval to a number you choose, ex., set it back = to 1.=20 Turns out the documentation doesn't state you can, and it errors = out.  Am=20 I missing something?  I am writing a procedure to drop and = recreate the=20 sequence instead.

  1* alter sequence = seq_gn_special_offers_id=20 nextval =3D 1
SQL> / =
alter sequence seq_gn_special_offers_id nextval = =3D 1=20
          &nbs= p;            = ;            =     =20 *
ERROR at line 1: =
ORA-02286: no options specified for ALTER = SEQUENCE=20

SQL> alter sequence = seq_gn_special_offers_id set=20 nextval =3D 1;
alter sequence=20 seq_gn_special_offers_id set nextval =3D 1
          &nbs= p;            = ;            =     =20 *
ERROR at line 1: =
ORA-02286: no options specified for ALTER = SEQUENCE=20

Lisa Rutland Koivu =
Oracle Database Administrator (do I dare call = myself=20 that??)
Qode.com =
4850 North State Road 7
Suite G104
Fort = Lauderdale, FL =20 33319

V: 954.484.3191, x174
F: 954.484.2933
C:=20 954.658.5849
http://www.qode.com

"The information = contained herein=20 does not express the opinion or position of Qode.com and cannot be =