Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sequences
In 8.1.7 I get :
1 select z1seq.nextval, dummy from dual
2 union all
3* select z2seq.nextval, dummy from dual
SQL> /
select z1seq.nextval, dummy from dual
*
ERROR at line 1:
ORA-02287: sequence number not allowed here
Indeed, the 8.1.7 SQL Reference, on p. 2-60, says :
"
Restrictions: You cannot use CURRVAL and NEXTVAL:
- A subquery in a DELETE, SELECT, or UPDATE statement
What Oracle version (w/o error) where you using ?
Andre
Billy Verreynne wrote:
> "Daniel A. Morgan" <Daniel.Morgan_at_attws.com> > > > > Was wondering what is the reason behind sequences not generating > > > numbers when used in a UNION. Also, why does Oracle tell you no-no and > > > perform the SQL without any errors?Received on Sun Jul 22 2001 - 07:09:10 CDT