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

Home -> Community -> Usenet -> c.d.o.server -> Re: about sequence in oracle

Re: about sequence in oracle

From: John Russell <johnrussell10_at_home.com>
Date: Mon, 13 Aug 2001 07:29:01 GMT
Message-ID: <n70fnt0o1b209h3i0hfrbefgud1ou7qepm@4ax.com>

On 12 Aug 2001 22:35:26 -0700, sohelcsc_at_yahoo.com (Leader) wrote:

>Dear all,
> i have a problem. that is, suppose i have created sequence for
>primary key of one table where start with 1, increment by 1, .... and
>i have inserted three rows in the table. after that i delete the rows.
>but when i insert next time primary id starts with 4. is there any
>options without droping the sequence, if i want to start the id again
>from 1.
>
>thanks,
>hoque.

If you have enough data to make it worthwhile to use SQL*Loader, you can use the SEQUENCE keyword in the control file with a couple of different options. I use the option that says "start with the max value of the column + 1". You can also reset to 1 with each load.

John

--
Got an Oracle database question?
Try the search engine for the database docs at:
http://tahiti.oracle.com/
Received on Mon Aug 13 2001 - 02:29:01 CDT

Original text of this message

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