Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: temporarily stop and then restart autonumbering of primary key field

Re: temporarily stop and then restart autonumbering of primary key field

From: Walt <walt_askier_at_SHOESyahoo.com>
Date: Wed, 17 Aug 2005 11:02:12 -0400
Message-ID: <2kIMe.240$De1.189@news.itd.umich.edu>


brightspot wrote:

> Possible. Thanks.
>
> Details please?
>
> Thanks,
> Chris
>
> P.S. Messing with primary key fields has bit me in the past.

Well, there is no "autonumbering" in Oracle like SQLServer. You usually get the primary key value from a sequence.

So, to do what you want to do, create the sequence with an initial value of one, insert the first 5 rows, then drop and recreate the sequence with an initial value of 38.

//Walt Received on Wed Aug 17 2005 - 10:02:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US