通过 sequence 设置id自动增长
public String getUniquePrimary(String seq){
String sql="select "+seq+".nextval as idArray from dual ";
List<IdArray> list=query(sql, IdArray.class);
return list.get(0).getIdArray();
}
String sql=" insert into Licence_type (ltid,ltname,) values('"+super.getUniquePrimary("LICENCE_TYPE_ADD_SEC")+"' ,)";
在oracle中新建 sequence,设置Name(LICENCE_TYPE_ADD_SEC),Nextnumber,minValue,等初始值