Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Automatically reset Sequence to initial value?
Todd Owers wrote:
> I want to have a sequence automatically reset to its initial value (i.e.,
> its START WITH parameter) on January 1, 1998 at 12:01 a.m., and the first
> of every year thereafter.
>
> I know it is possible to manually type ALTER SEQUENCE statements to
> accomplish this, but is there a way to do it automatically?
You should be able to do it with dbms_job "the Oracle variant of cron". BTW, you can't reset it to it's initial value by "alter sequence ...". You must drop it and recreate it again, unless this has changed from 7.1.x (which I'm currently stuck on).
Best wishes
Claus Jensen
Received on Fri Oct 17 1997 - 00:00:00 CDT
![]() |
![]() |