Quantcast
Channel: CodeSection,代码区,数据库(综合) - CodeSec
Viewing all articles
Browse latest Browse all 6262

Spring整合Mybatis,获取删除的数据行数 数据库 数据库学习 Spring Mybatis

$
0
0

Spring整合Mybatis,获取删除的数据行数。

spring 整合Mybatis,在 编写 delete接口的SQL时,不允许设置 resultType ,无法通过执行多条语句来获取删除受影响的行数。

更简洁的解决方法:

delete接口的返回类型设为Integer, 不需要在中 定义resultType,即可自动返回受影响的行数。


Viewing all articles
Browse latest Browse all 6262

Trending Articles