ORA-08002: sequence SEQ_PREPAY.CURRVAL is not yet defined in this session的原因

打开一个新会话后,若首先没有执行一次  select seq_prepay.nextval from dual前就先执行select seq_prepay.currval from dual,则就会出现错误ORA-08002: sequence SEQ_PREPAY.CURRVAL is not yet defined in this session,因为在该会话的内存上还没有存储该序列的当前值,而执行一次select seq_prepay.nextval from dual后,该会话的内存上则就将seq_prepay.nextval值赋值给该序列的当前值变量了。

你可能感兴趣的:(ORA-08002: sequence SEQ_PREPAY.CURRVAL is not yet defined in this session的原因)