标签:nbsp tis property bsp 返回值 type use key into
主键不自增:返回值是插入的条数
<insert id="add" parameterType="EStudent"> insert into TStudent(name, age) values(#{name}, #{age}) </insert
主键自增:
<insert id="add" parameterType="EStudent" useGeneratedKeys="true" keyProperty="id"> insert into TStudent(name, age) values(#{name}, #{age}) </insert>
【mybatis】mybatis中insert 主键自增和不自增的插入情况【mysql】
标签:nbsp tis property bsp 返回值 type use key into
原文地址:https://www.cnblogs.com/sxdcgaq8080/p/9153805.html