1 创建序列
create sequence test1
minvalue 1
maxvalue 999999999999999999999999999
start with 1
increment by 1
cache 10;
2 查看当前序列
SQL> select test1.currval from dual;
select test1.currval from dual
ORA-08002: sequence TEST1.CURRVAL is not yet defined in this session
SQL> select test1.nextval from dual;
NEXTVAL
----------
1
总结:
1创建索引是从nextval开始的,如果从currval开始就会报错