Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Sequence
A copy of this was sent to "Andreas Sbrzesny" <sbrzesn_at_uni-muenster.de>
(if that email address didn't require changing)
On Tue, 08 Jun 1999 14:25:24 +0200, you wrote:
>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.
>
I can't really figure out what it is you are trying to say.. sequences don't take any space in the database really (a row or two in the data dictionary)...
Can you elaborate on what exactly the problem is?
>Who knows how to solve that problem via a sequence or a trigger (on
>insert).
>
>
>Thanks,
>Andreas
See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Tue Jun 08 1999 - 07:54:41 CDT
![]() |
![]() |