Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: auto-incremental fields ?
CREATE SEQUENCE ID
INCREMENT BY 1
START WITH 1
NOMAXVALUE NOCYCLE
NOCACHE;
CREATE OR REPLACE TRIGGER TBL_BIU
BEFORE INSERT OR UPDATE ON TBL
FOR EACH ROW
DECLARE
This is similar to an example from Oracles document on upgrading MS SQL Server to Oracle explaining how to similate a counter.
AGRISOFT/ABSILOG wrote:
> if the best way to have auto-incremental field for my primary key is to
> fire a trigger, what could be this good trigger ?
>
> if u have one be pleased to send it to me...
>
> jo :)
>
> thx !!!
Received on Wed Feb 10 1999 - 17:38:07 CST
![]() |
![]() |