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: Newbie question: How to add auto number...

Re: Newbie question: How to add auto number...

From: Thiru <tmgn_at_excite.com>
Date: Wed, 15 Sep 1999 15:46:31 -0400
Message-ID: <37DFF797.58EF9ABE@excite.com>

Jack,
You need to Create a Sequence (which can generate Unique Numbers starting at a value specified by you, increment by a specified value, grow to a Very big Number or Cycle at a Specified Value ) .

The command is
>Create sequence <SEQ_NAME>

increment by <integer>
start with <integer>
maxvalue <integer> ...;

Then while inserting ,you can use it like

Insert into <table_name> values(SEQ_NAME.nextval,...);

Hope this helps

-Thiru

Jack Chen wrote:

> Hi,
>
> Sorry for asking this question, this is my first day on Oracle.
>
> How to make the first column(such as 'User_ID')add an auto number, it was
> very easy in Access and SQL.
>
> Thanks
>
> Jack
Received on Wed Sep 15 1999 - 14:46:31 CDT

Original text of this message

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