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: Need to create a AUTO INCREMENT field...

Re: Need to create a AUTO INCREMENT field...

From: Mike Dwyer <dwyermj_at_co>
Date: 2000/08/11
Message-ID: <NHUk5.43$Rc3.2161@wdc-read-01.qwest.net>#1/1

Use a sequence:

create sequence mytable_s;

insert into mytable (column1,...,columnN) select mytable_s.nextval,...,columnNvalue from dual;

In Oracle Forms, you can specify the sequence, mytable_s.nextval, as a default value for the column.

"CS Raghavendra Prasad" <RaghavendraPrasad.CS_at_sisl.co.in> wrote in message news:39924952.55AE06F_at_sisl.co.in...
> Hello all.,
> I want to create a table with one of the fields which auto
> increments
> itself as records are added.
> How can I do this...
>
> Regards
> Raghu
>
Received on Fri Aug 11 2000 - 00:00:00 CDT

Original text of this message

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