Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question about Sequences
Daniel Morgan <dmorgan_at_exesolutions.com> wrote in message news:<3CFE2D5C.711520B_at_exesolutions.com>...
> Ryan Gaffuri wrote:
>
> > Someone on my project recently truncated all the tables in one of our
> > databases and imported new data. The problem is that the our sequence
> > generators did not reset to match the highest sequence we have in our
> > primary keys, so we keep hitting a unique constraint.
> >
> > Is there a command to reset sequences to the highest value in the
> > table?
> > Id prefer to run this dynamically than have to find the highest value
> > for each sequence add set it to n + 1. This would be time consuming.
> >
> > Thanks.
>
> Drop the sequence and recreate it with the correct starting number.
>
> Daniel Morgan
thanks... i was hoping for a short cut. Received on Wed Jun 05 2002 - 17:04:56 CDT