本文介绍了更改DB2标识以添加Cycle Cache和特定的重新启动值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将一个db2身份改为循环缓存,并使其(重新)以特定值开始,如:
I want to alter a db2 identity to cycle cache and to make it (re)start with a specific value, something like:
ALTER TABLE ALTER COLUMN
SET GENERATED ALWAYS AS IDENTITY (CYCLE CACHE 100) RESTART WITH 32323
有没有办法这样做,以便我可以添加循环缓存以及从特定的数字重新启动?
Is there a way of doing this so that I can add cycle cache as well as make it restart from a specific number?
推荐答案
什么版本和平台的DB2?
What error are you seeing? What version and platform of DB2?
以下内容适用于DB2 for IBM i 7.1
The following works on DB2 for IBM i 7.1
alter table mytable
alter column mycolumn
set generated always
set cycle
set cache 100
restart with 32323
此工作还
alter table mytable
alter column mycolumn
set generated always as identity
set cycle
set cache 100
restart with 32323
这篇关于更改DB2标识以添加Cycle Cache和特定的重新启动值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!