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 -> Sequence

Sequence

From: Andreas Sbrzesny <sbrzesn_at_uni-muenster.de>
Date: Tue, 08 Jun 1999 14:25:24 +0200
Message-ID: <375D0BB4.55E2B1A8@uni-muenster.de>


Hello,

we have got the following problem:

there are several tables with primary keys named "nr" (NUMBER) and we are looking for a automatized generation of that primary key.

We have tried to do that by a sequence,

CREATE SEQUENCE SetNR INCREMENT BY 1 MINVALUE 1 NOMAXVALUE NOCACHE; INSERT cust (NR, NAME) VALUES (SetNr.NextVal, 'TestName');

But that statement return eachtime it runs a global new number, so we loose a lot of
dbspace.

Who knows how to solve that problem via a sequence or a trigger (on insert).

Thanks,
Andreas Received on Tue Jun 08 1999 - 07:25:24 CDT

Original text of this message

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