最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Mybatis中的like模糊查询功能
时间:2022-06-25 14:27:57 编辑:袖梨 来源:一聚教程网
1. 参数中直接加入%%
代码如下 | 复制代码 |
param.setUsername("%CD%"); param.setPassword("%11%"); select id,sex,age,username,password from person wheretrue |
2. bind标签
代码如下 | 复制代码 |
select id,sex,age,username,password from person where username LIKE #{pattern} |
3. CONCAT
代码如下 | 复制代码 |
where username LIKE concat(concat('%',#{username}),'%') |
相关文章
- lat是什么币 LAT是什么币种 06-27
- 中国十大虚拟货币排名 06-27
- 派币对接中国四大银行 派币对接中国四大银行最新消息 06-27
- coinex CoinEx交易所是诈骗嘛 06-27
- 鸣潮ue4崩溃解决方法-鸣潮ue4clientgame已崩溃闪退解决方案 06-27
- 比特币价格 比特币价格历史走势图 06-27