1、创建sequence
create sequence seq_test
minvalue 1
maxvalue 21
start with 1
increment by 1
cache 20
cycle
order;
minvalue 1 / nominvalue:最小值为1
maxvalue 21 / nomaxvalue:最大值为21
start with 1:从1开始计数
increment by 1:每次增加1
cache 20 / nocache: 缓存20个sequence值 / 不缓存
2、删除
drop sequence seq_test;
3、修改sequence.nextval的值
alter sequence seq_test increment by 10
seq_test 序列加10,-10则表示减10