Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: oracle 8 and auto incrementing columns
For table BBTbCategorie with numeric column DnKey
CREATE SEQUENCE SqCategorie_Key;
CREATE OR REPLACE TRIGGER TrBiCategorie
BEFORE INSERT ON BBTbCategorie
FOR EACH ROW
BEGIN
SELECT SqCategorie_Key.NextVal INTO :new.DnKey FROM Dual;
END;
/
success,
Chris
Leif Kremkow heeft geschreven in bericht <36F0D972.F9DB0D32_at_t-online.de>...
>i'm trying to get a a column to auto increment, like sybase's "auto
>increment" or MS SQL's "identity".
>
>how do i do that in oracle 8? in sql or the enterprise manager...
>
>
>regards,,
>leif kremkow
Received on Thu Mar 18 1999 - 08:05:30 CST
![]() |
![]() |