Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Changing the Current Value of a Sequence?
In article <uDUZ66sI9GA.204_at_upnetnews04>,
Karl E. Jørgensen <kjorg_at_msn*DOT*com> wrote:
>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 ?
perhaps alter sequence to have max and min values bracketing the desired value, select on one, then alter back. I haven't tried this, but just a thought.
>
>--
>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?
>>
>>
>
>
-- These opinions are my own and not necessarily those of Information Quest jgarry@eiq.com http://www.informationquest.com http://ourworld.compuserve.com/homepages/joel_garry "See your DBA?" I AM the @#%*& DBA!Received on Fri Jan 16 1998 - 00:00:00 CST
![]() |
![]() |