mysql - Ibatis Sequence Number Generation -
i new ibatis. how generate sequence number using ibatis , insert number mysql table? sequence number should start 1000 can used primary key in table. using spring, ibatis , mysql.
as ibatis dead since 2010, presume mybatis usage. mybatis can use these annotations insert , retrieve primary key db , map both interface:
@insert("insert table2 (name) values(#{name})") @selectkey(statement="call identity()", keyproperty="nameid", before=false, resulttype=int.class) int inserttable2(name name);
Comments
Post a Comment