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

Home -> Community -> Usenet -> c.d.o.server -> Re: Changing the Current Value of a Sequence?

Re: Changing the Current Value of a Sequence?

From: Karl E. Jørgensen <kjorg_at_msn*DOT*com>
Date: 1998/01/16
Message-ID: <uDUZ66sI9GA.204@upnetnews04>#1/1

You're right - it is a bit tedious. But when you drop and re-create the sequence, you'll have to re-grant to everybody. Of course that can be automated too (if you've got the right scripts).

I usually end up writing a small PL/SQL loop that bumps the sequence up (assuming the increment is positive). I never had to run a sequence 'backwards' - perhaps somebody else can help here ?

--
Karl
Oracle Certified DBA
Grue wrote in message <34bfb1a1.18931448_at_128.158.254.10>...

>Is there any way to reset the current value of a sequence to a
>different number, other than by dropping and recreating the sequence?
>I know it can't be done using ALTER SEQUENCE. The only thing I can
>come up with is to keep selecting NEXTVAL until I get to the desired
>value, but that seems tedious. Any other ideas?
>
>
Received on Fri Jan 16 1998 - 00:00:00 CST

Original text of this message

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