Mybatis获取自增主键的两种方式
2024-10-21 07:47:02
<insert id="saveOne" parameterType="com.buwei.entity.User" >
INSERT into user(name, password) value(#{name},#{password})
<selectKey keyProperty="id" order="AFTER" resultType="int">
select last_insert_id()
</selectKey>
</insert>
<insert id="saveOne" parameterType="com.buwei.entity.User" useGeneratedKeys="true" keyProperty="id">
INSERT into user(name, password) value(#{name},#{password})
</insert>
最新文章
- Python学习--04条件控制与循环结构
- 探索ASP.NET MVC5系列之~~~4.模型篇---包含模型常用特性和过度提交防御
- Android 手机摇一摇功能的实现
- nohup命令
- Android:控件AutoCompleteTextView 客户端保存搜索历史自动提示
- 第六篇、CSS属性
- Eric Pement的单行awk命令收集
- (1)ActivityThread分析
- Django URL (路由系统)
- ThreadLocal源码解读
- Codeforces 750E New Year and Old Subsequence 线段树 + dp (看题解)
- P2590 [ZJOI2008]树的统计
- 如何实现从 Redis 中订阅消息转发到 WebSocket 客户端
- SharePoint 2016 IT Preview的新feature列表
- 记一次centos7内核可能意外丢失(测试直接干掉)恢复方法
- linux中ftp提示--553 Could not create file
- Ubuntu 14.04(64bit)使用indicator-sysmonitor显示系统运行状态
- Angular中EventEmitter不是泛型类型
- secureCRT mac 下破解
- 《DSP using MATLAB》示例Example 8.1
热门文章
- hisql orm update表数据更新文档
- CTF-sql-宽字节注入
- 【刷题-LeetCode】236. Lowest Common Ancestor of a Binary Tree
- Cesium入门5 - Cesium ion
- QT之鼠标事件
- 一份尽可能全面的Go channel介绍
- 不难懂-----type=number 去掉加减按钮并禁止鼠标滚轮滚动
- Method com/mchange/v2/c3p0/impl/NewProxyResultSet.isClosed()Z is abstract
- python if-elif-else 判断
- PyTorch 介绍 | TRANSFORMS