Mybatis在执行insert语句返回自增主键

SELECT LAST_INSERT_ID() AS id

               或者(

               

SELECT SEQ_TEST.NEXTVAL FROM DUAL

)

insert into category (name_zh, parent_id,

)

values (#{nameZh,jdbcType=VARCHAR},

#{parentId,jdbcType=SMALLINT},

)

你可能感兴趣的:(mybatis)