anyone seen this weirdness with sequences in 11gr2?

This works correctly in 11gr1:

SQL> drop sequence c_seq;

Sequence dropped.

SQL> create sequence c_seq nocache;

Sequence created.

SQL> select c_seq.nextval from dual;

   NEXTVAL
----------
         1

SQL>
SQL> drop sequence c_seq;

Sequence dropped.

SQL> create sequence c_seq nocache;

Sequence created.

SQL> drop table x;

Table dropped.

SQL> create table x(x number);

Table created.

SQL> insert into x(x) values(c_seq.nextval);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from x;

         X
----------
         2


The question is why from the c_seq.nextval WITHIN an insert do I get back 
a 2 instead of a 1 like if i did it OUTSIDE of an insert.

this works correctly in 11gr1.

thanks, joe

_______________________________________
Joe Testa, Oracle Certified Professional 
Senior Engineering & Administration Lead
(Work) 614-677-1668
(Cell) 614-312-6715


Other related posts: