1. 程式人生 > >Sql 插入ID最大值加1

Sql 插入ID最大值加1

insert into aa (id,name) values((select case when max(id) is null then 1 else max(id)+1 end from aa),'a');