Search notes:
ORA-02287: sequence number not allowed here
create sequence tq84_seq;
create table tq84_tab (id integer, val varchar2(10));
begin
insert into tq84_tab values (tq84_seq.nextval, 'abc');
insert into tq84_tab values (tq84_seq.nextval, 'def');
commit;
end;
/
Sequences are not allowed in
where
conditions; the following statement throws
ORA-02287: sequence number not allowed here:
select val from tq84_tab where id = tq84_seq.currval;
Sequences are also not allowed with
with
clauses, the same error is thrown:
with seqval as (select tq84_seq.currval curid from dual)
select
val
from
tq84_seq join
seqval on id = curid;