Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Non working sequence
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