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-incremental fields ?

Re: auto-incremental fields ?

From: Daniel Cox <DCox_at_mailexcite.com>
Date: Thu, 11 Feb 1999 10:08:07 +1030
Message-ID: <36C2185E.2BB5916F@mailexcite.com>


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

Original text of this message

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