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: Autoincrement

Re: Autoincrement

From: Luis Campos <lcampos_at_cpcis.pt>
Date: Thu, 14 Oct 1999 12:57:47 +0100
Message-ID: <7u4gc8$ttg$1@duke.telepac.pt>


Create sequence my_seq

    start with 1
    increment by 1;

insert into table (id, descr)
values (my_seq.NEXTVAL, 'My Description');

What is it hard about this?

buurd_at_my-deja.com wrote in message <7u48nb$a5r$1_at_nnrp1.deja.com>...
>Hi!
>I'm looking for a function in Oracle that would autoincrement an
>idcolumn so that every column gets it's own uniqe number. I'll looked
>at seqences but i don't understand how to automate the process so that
>for every new row there is a new (uniqe) number.
>
>Tia
>
>--
>Roland Carlsson
>Certified Java programmer
>Skövde
>Sweden
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Thu Oct 14 1999 - 06:57:47 CDT

Original text of this message

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