Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Reset a Sequence
You could write a dbms_job to reset the values every morning.
How you can reset:
1. Drop and recreate it.
2. There was a thread in this group regarding altering sequence by a -ve
increment value to reset it
and then altering it again for a proper increment (1). Don't remember the details but you can search for it.
Anurag
"Roman Sochan" <rsochan_at_removeme.ix.netcom.com> wrote in message
news:9mm156$8u4$1_at_slb0.atl.mindspring.net...
> Is there a way to have Oracle automatically reset a sequence on a schedule
> every morning?
> The database in question will use a primary key which includes the
sequence
> and a date:
> 0001-30AUG2001
> 0002-30AUG2001
> .
> the next day:
>
> 0001-31AUG2001
> 0002-31AUG2001
Received on Thu Aug 30 2001 - 15:22:24 CDT