# oracle
## 序列
```oracle
-- 查询当前用户下的所有序列
SELECT sequence_name FROM user_sequences;
-- 查询所有用户下的所有序列
SELECT sequence_name FROM all_sequences;
-- 查询序列的下一个值
select 序列名.nextval from dual;
select 序列名.currval from dual;
-- 将序列的值增长10000
alter sequence 序列名 increment by 10000;
select 序列名.nextval from dual;
alter sequence 序列名 increment by 1;
select 序列名.currval from dual;
```
评论区