查看先前及下一个序列的值
values previous value for db2inst1.dongseq
values next value for db2inst1.dongseq
新建一个序列
db2 => create sequence dongseq start with 1 increment by 2 nomaxvalue nocycle cache 10
新建一个序列,叫dongseq 从1 开始,增量2,没有最大值,不重复使用,缓存量为10
使用一个序列
insert into test (id) values (next value for db2inst1.dongseq)
update test set id= next value for db2inst1.dongseq where id= 350
序列
数据类型
起始值 start with
最小值 minvalue
最大值 maxvalue
增量值 increment by
序列是否循环 cycle nocycle
缓存 cache 100 no cache
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7338183/viewspace-660802/
,如需转载,请注明出处,否则将追究法律责任。