更新数据库Sequence
alter table TABLE_NAME alter column ID restart with 640;
--查询表的主键
select * from SYSCAT.KEYCOLUSE where TABSCHEMA='DB2ADMIN' and TABNAME = 'TEST_TABLE';
--查询所有表名称
SELECT TABNAME FROM SYSCAT.TABLES WHERE TYPE = 'T'
--一次更新数据库中所有表的Sequence
select 'ALTER TABLE ' || TABNAME || ' ALTER COLUMN ' || COLNAME || ' RESTART WITH 100000100;' from SYSCAT.KEYCOLUSE where TABSCHEMA='DB2ADMIN' AND TABNAME IN (select TABNAME from syscat.tables where tabschema='DB2ADMIN' AND TYPE='T' AND COLSEQ=1) ;
--查询索引
describe indexes for table DB2ADMIN.TABLE_NAME