Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: about sequence in oracle
"John Russell" <johnrussell10_at_home.com> wrote in message
news:n70fnt0o1b209h3i0hfrbefgud1ou7qepm_at_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.
>
Not if it is the primary key of that table, he can't!!
And guess what he's using the sequence for? Er, the primary key.
Regards
HJR
> 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:40:49 CDT