Oracle 序列

-- 序列
-- currval:返回sequence的当前值
-- nextval:返回增加sequence的值,然后返回sequence的值

SELECT SEQ_NAME.currval FROM dual;
SELECT SEQ_NAME.nextval FROM dual;

-- 创建序列
CREATE SEQUENCE SEQ_NAME
minvalue 1
maxvalue 999999999999999999999
start with 1000
increment by 1
cache 20;

  

posted @ 2018-11-08 14:07  天蓝隐湘  阅读(109)  评论(0编辑  收藏  举报