Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: auto increment of primary key in ORACLE
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
![]() |
![]() |