mybatis插入后主键返回
2017-01-14 15:35
204 查看
<insert id="insert" parameterType="com.wenwen.pojo.User" > <selectKey keyProperty="id" resultType="long" order="AFTER"> SELECT LAST_INSERT_ID() </selectKey> insert into edu_user (ID, MOBILE, EMAIL) values (#{id,jdbcType=BIGINT}, #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, </insert>
用insertSelective也是一样配置
相关文章推荐
- 【MyBatis框架点滴】——mybatis插入数据返回主键(mysql、oracle)
- SqlServer2005配置mybatis3.0插入数据返回该数据的主键
- Mybatis 批量插入返回 主键ID
- 记录学习的点滴(MyBatis中插入操作返回主键)
- MyBatis返回插入的主键ID(Mysql数据库)
- 关于mybatis(insert插入)返回主键的问题
- 关于MyBatis插入语句,返回主键的值
- Mybatis(二):插入操作返回主键
- Mybatis+Mysql返回插入的主键ID
- MyBatis+MySQL 返回插入的主键ID
- MyBatis在Oracle中插入数据并返回主键的问题解决
- MyBatis+MySQL 返回插入的主键ID
- MyBatis在insert插入操作时返回主键ID
- MyBatis在insert插入操作时返回主键ID的配置(推荐)
- Java MyBatis 插入数据库返回主键
- Mybatis+Mysql 批量插入的时候返回主键ID
- Mybatis+MySQL插入数据后返回主键
- 关于mybatis用mysql时,插入返回自增主键的问题
- MyBatis在insert插入操作时返回主键ID的配置
- mybatis 使用自增主键, 插入记录并返回自增主键 MySQL