我想更改db2标识以循环缓存,并使其(重新)以特定值开始,类似于:
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?
What error are you seeing? What version and platform of DB2?
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