| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: about sequence in oracle
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
![]() |
![]() |