Re: Autoincrement in Oracle 8.1.7

From: Shri <shri_sastha_at_hotmail.com>
Date: 27 Apr 2002 22:29:40 -0700
Message-ID: <796a1e12.0204272129.4650313f_at_posting.google.com>


Dave <davep_at_centurysystems.net> wrote in message news:<3CC994B6.65100016_at_centurysystems.net>...
> Hello.
>
> I am fairly new to Oracle, can anyone tell me if there is a way to
> create a column (primary key) that the database itself will fill in
> automatically with a sequential number ?
>
> Thanks in advance

Try Create Sequences. when you create them you can specify the starting number, Increments etc.... Its pretty straight forward.

ex.
 let say you create a sequence called emp_id.

emp_id.currval - will give you current values of emp_id seq emp_id.netxval - will next values.

its simple as that

cheers

ss Received on Sun Apr 28 2002 - 07:29:40 CEST

Original text of this message