Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: RESETTING A SEQUENCE
In our last gripping episode "Andrew Pahomov" <Pahomov_at_validio.com.ua>
wrote:
> Or create sequence with cycle and writing simple script for cycle
sequence
> until right value not find ;)
>
> Sybrand Bakker <postbus_at_sybrandb.demon.nl> wrote in message
> news:8vtlq4$5qnut$2_at_ID-62141.news.dfncis.de...
> >
> > "SDG" <simong_at_explor.co.uk> wrote in message
> > news:7psU5.276$4o3.168024_at_newsr1.u-net.net...
> > > HOW DO YOU RESET A SEQUENCE NUMBER ?
> > >
> > > Thanks in anticipation
> > > SDG
> > >
> > >
> > First of all: please stop using caps.
> > You can reset a sequence by dropping and recreating it, alter
sequence
will
> > not work.
> >
> > Hth,
> > Sybrand Bakker, Oracle DBA
> >
> >
> >
>
>
A suggestion that I wouldn't take. I prefer to drop and recreate the sequence, as Sybrand stated, which is easier, faster and more reliable. Simply create a script to drop and recreate the sequence rather than write a script to cycle through a sequence to get it back to the desired value.
-- David Fitzjarrell Oracle Certified DBA Sent via Deja.com http://www.deja.com/ Before you buy.Received on Mon Nov 27 2000 - 17:52:40 CST