miércoles, 14 de octubre de 2020

CREATE SEQUENCES CURRVAL NEXTVAL

select * from USER_sequences

select locations_seq.currval from dual;

SQL> select sysdate from dual;

SQL> select hr.locations_seq.currval from dual;
select hr.locations_seq.currval from dual
                                     *
ERROR at line 1:
ORA-08002: sequence LOCATIONS_SEQ.CURRVAL is not yet defined in this session

SE GENERA ESTE ERROR ES PORQUE LA SECUENCIA NO SE HA UTILIZADO

SQL> select hr.locations_seq.nextval from dual;

   NEXTVAL
----------
      3300

SQL> select hr.locations_seq.currval from dual;

   CURRVAL
----------
      3300

SQL> 




No hay comentarios: