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: Does oracle have an auto increment column

Re: Does oracle have an auto increment column

From: Bob Withers <bwit_at_pobox.com>
Date: Sat, 6 Jun 1998 18:50:00 -0500
Message-ID: <MPG.fe391a7946da4fb9896c5@news.swbell.net>


In article <01bd9180$9ebbef80$9abccecf_at_bbearden>, bbearden_at_bcl.net says...
> Having started out on SQL Server, this is one feature (there aren't many) I
> do miss in Oracle. In SQL Server, it is called an INDEX column. Sequences
> in Oracle perform a similar function but they aren't automatic. Every
> programmer and every program inserting a row in a table must know to fill
> in the PK column with the NEXTVAL of the sequence.
>

Just put the sequence code in a before row trigger.

--

Bob Withers              Do or do not, there is no try.
bwit_at_pobox.com                                  Yoda
Received on Sat Jun 06 1998 - 18:50:00 CDT

Original text of this message

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