在H2数据库中自动增加ID
是否有一个表有一个auto_incrementing BIGINT ID。 它可以像这样定义
id bigint auto_increment 但这没有效果(它不会自动增加)。 我想插入除ID字段外的所有字段 – ID字段应由DBMS提供。 或者我需要调用一些东西来增加ID计数器?
 这个对我有用。  JDBC URL: jdbc:h2:~/temp/test2 
 drop table test; create table test(id bigint auto_increment, name varchar(255)); insert into test(name) values('hello'); insert into test(name) values('world'); select * from test; 
结果:
 ID NAME 1 hello 2 world 
很简单:
 id int auto_increment primary key 
H2将自动创buildSequence对象
 你也可以使用default : 
 create table if not exists my(id int auto_increment primary key,s text); insert into my values(default,'foo'); 
 id bigint(size) zerofill not null auto_increment,