SELECT seq.CURRVAL FROM dual; SELECT seq.NEXTVAL FROM dual;
if you execute the first script before executing second one, you will get the error
ORA-08002: "sequence %s.CURRVAL is not yet defined in this session" *Cause: sequence CURRVAL has been selected before sequence NEXTVAL *Action: select NEXTVAL from the sequence before selecting CURRVAL
The solution is simple. Execute the second script initially.