The Oracle CURRVAL function is used to access the current value of the specified sequence. Note that CURRVAL can only be used if NEXTVAL has been referenced in the current user session at least once.
You cannot use
NEXTVAL in the following constructs:
CREATE SEQUENCE seq_2
INCREMENT BY 1 START WITH 1
MAXVALUE 50 MINVALUE 0
NOCYCLE CACHE 20 ORDER;
CREATE TABLE table1 (col1 int, col2 int);
INSERT INTO table1 VALUES (0, 0);
You may also want to see the entries for NEXTVAL and SEQUENCEs.