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

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

Re: ALTER SEQUENCE NEXTVAL

From: Jared Still <jkstill_at_bcbso.com>
Date: Thu, 7 Sep 2000 16:04:27 -0700 (PDT)
Message-Id: <10612.116470@fatcity.com>


Lisa,

Check out my article on this subject at www.teleport.com/~jkstill/util

It explains how to do this and includes examples.

It is under the link 'Resetting Oracle Sequences'. The article and code are available in a link at the end of the page

Jared

On Thu, 7 Sep 2000, Koivu, Lisa wrote:

> 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."
>
>

Jared Still
Certified Oracle DBA and Part Time Perl Evangelist ;-) Regence BlueCross BlueShield of Oregon
jkstill_at_bcbso.com - Work - preferred address Received on Thu Sep 07 2000 - 18:04:27 CDT

Original text of this message

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