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

Home -> Community -> Usenet -> c.d.o.tools -> Re: how to update a sequence?

Re: how to update a sequence?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 26 Jun 2001 18:10:08 +0200
Message-ID: <tjhcqt1bd00a92@beta-news.demon.nl>

"Norbert Lemke" <ofenroor_at_gmx.de> wrote in message news:9ha682$cgdcd$1_at_ID-76747.news.dfncis.de...
> Hi,
>
> I have an oracle sequence, it generates unique keys (everything all right
 so
> far). With my Visual-Basic-GUI I can create single records 'insert into
 tab
> (id) values(seq.nextval)', and everything works fine.
>
> But now I want to insert some bulk data, 10,000 records at once. I want to
> do this wiht the SAS-software, which has an own data format and own method
> for appending records.
>
> First I read the next free sequence number (say 120,001), and since I know
> the number of new records (10,000) I want to update the sequence to
 130,000
> at once. Thereafter I can insert all records without any trouble. How can
> this be done? Is tere a method like 'update seq set currval=130000'?
>
> Thanks,
> Norbert

There is not.
You need to drop the sequence and to recreate it with a higher minval.

Hth,

Sybrand Bakker, Oracle DBA

>
>
Received on Tue Jun 26 2001 - 11:10:08 CDT

Original text of this message

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