DB2中的序列
 
1、创建方法与oracle相同:
  www.2cto.com  
CREATE SEQUENCE "KGL"."rbc_repid" AS BIGINT
MINVALUE 1 MAXVALUE 999999999999999999
START WITH 1 INCREMENT BY 1
CACHE 20 CYCLE NO ORDER;
 
2、中加值:
 
insert into kgl.rep_bcard_comsume(repid,purse_cardid) values(nextval for kgl.rbc_repid,'123')
 
使用方式为:
nextval for kgl.rbc_repid