I have this SQL script i my app:
select my_seq.nextval from dual connect by level <= 100;
It works great but once I saw (in logs) that it returned no rows at all. Value of sequence is quite far from maximum. I wonder how is it possible at all.
Sequence creation script:
CREATE SEQUENCE my_seq
MINVALUE 1 MAXVALUE 999999999999999999999999999
INCREMENT BY 1 START WITH 3602281
CACHE 2000 NOORDER NOCYCLE;
There is a small possibility that your
DUALtable is empty or that you have a localDUALtable? Try:If no rows then try: