Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Non working sequence

Non working sequence

From: <buurd_at_my-deja.com>
Date: Fri, 15 Oct 1999 07:11:39 GMT
Message-ID: <7u6k35$va$1@nnrp1.deja.com>


Hi!

If I have understood correct this should result in that "mytable.id" has two different numbers:

create sequence myseq;

insert into adress(id) values(myseq.nextval); insert into adress(id) values(myseq.nextval);

ORA-00001: unique constraint (ROLAND.ADRESS_ID_PRIM) violated

select id from adress;

id
--

 0

Q1: Why is id = 0?? myseq has a minimum of 1. Q2: Why doesn't myseq.nextval update the number??

When I created a dummy-table without the primary-key myseq works fine. But not on the adress-table.

Tia

--

Roland Carlsson
Certified Java programmer
Skövde
Sweden

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Oct 15 1999 - 02:11:39 CDT

Original text of this message

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