Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: auto increment of primary key in ORACLE

Re: auto increment of primary key in ORACLE

From: Michael Mehling <m.mehling_at_atos-group.de>
Date: Mon, 9 Aug 1999 09:21:51 +0100
Message-ID: <7olvqq$s1k$1@news.pop-stuttgart.de>


Hi Wolfgang,
Use a trigger and a sequence. The Sequence gives you the next number, in the trigger (on insert) you can set the primary key best regards
Michael Mehlong
wolfgang karrer <wolfgang.karrer_at_ce.uni-linz.ac.at> schrieb in im Newsbeitrag: 37AE7559.7592CB7C_at_ce.uni-linz.ac.at...
> Hi,
>
> is it possible to auto increment the primary key of a table, like
>
> table emp
> empnr INTEGER primary key
>
> thanx for helping me!
>
Received on Mon Aug 09 1999 - 03:21:51 CDT

Original text of this message

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