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

Home -> Community -> Mailing Lists -> Oracle-L -> ALTER SEQUENCE NEXTVAL

ALTER SEQUENCE NEXTVAL

From: Koivu, Lisa <lkoivu_at_qode.com>
Date: Thu, 7 Sep 2000 08:35:54 -0400
Message-Id: <10612.116397@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C018C8.2A72A57A
Content-Type: text/plain;

        charset="iso-8859-1"

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.

  1* alter sequence seq_gn_special_offers_id nextval = 1 SQL> /
alter sequence seq_gn_special_offers_id nextval = 1

                                        *
ERROR at line 1:
ORA-02286: no options specified for ALTER SEQUENCE

SQL> alter sequence seq_gn_special_offers_id set nextval = 1; alter sequence seq_gn_special_offers_id set nextval = 1

                                        *
ERROR at line 1:
ORA-02286: no options specified for ALTER SEQUENCE

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

V: 954.484.3191, x174
F: 954.484.2933 
C: 954.658.5849

http://www.qode.com

"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_001_01C018C8.2A72A57A
Content-Type: text/html;

        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>ALTER SEQUENCE NEXTVAL</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">I thought I saw someone refer to doing =
this yesterday on the list.&nbsp; 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.&nbsp; Am I missing something?&nbsp; I am writing a = procedure to drop and recreate the sequence instead. </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; 1* alter sequence =
seq_gn_special_offers_id nextval =3D 1</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">SQL&gt; /</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">alter sequence =
seq_gn_special_offers_id nextval =3D 1</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">ERROR at line 1:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">ORA-02286: no options specified for =
ALTER SEQUENCE</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">SQL&gt; alter sequence =
seq_gn_special_offers_id set nextval =3D 1;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">alter sequence =
seq_gn_special_offers_id set nextval =3D 1</FONT>
<BR><FONT SIZE=3D2 =

FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">ERROR at line 1:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">ORA-02286: no options specified for =
ALTER SEQUENCE</FONT>
</P>

<P><B><FONT SIZE=3D1 FACE=3D"Arial">Lisa Rutland Koivu</FONT></B>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Oracle Database Administrator (do I =
dare call myself that??)</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Qode.com</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">4850 North State Road 7</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Suite G104</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">Fort Lauderdale, FL&nbsp; =
33319</FONT>
</P>

<P><FONT SIZE=3D1 FACE=3D"Arial">V: 954.484.3191, x174</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">F: 954.484.2933 </FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial">C: 954.658.5849</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial"><A HREF=3D"http://www.qode.com" =
TARGET=3D"_blank">http://www.qode.com</A></FONT>
</P>

<P><I><FONT COLOR=3D"#000000" SIZE=3D1 FACE=3D"Arial">&quot;The =
information contained herein does not express the opinion or position = of Qode.com and cannot be attributed to or made binding upon = Received on Thu Sep 07 2000 - 07:35:54 CDT

Original text of this message

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