mybatis获取主键id


SELECT LAST_INSERT_ID() AS id

insert into tb_specification (id, spec_name)
values (#{id,jdbcType=BIGINT}, #{specName,jdbcType=VARCHAR})


 

你可能感兴趣的:(mybatis)