Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Changing the Current Value of a Sequence?
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>...Received on Fri Jan 16 1998 - 00:00:00 CST
>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?
>
>