首页 > 数据库技术 > 详细

数据库模糊查询语句(mybatis中运用(xml文件))

时间:2017-03-01 18:08:58      阅读:528      评论:0      收藏:0      [点我收藏+]

其中concat未数据库中拼接字符串方法

方法1;

select distinct function_name,function_module,function_url,date
from agent_function
where
concat(‘‘,function_name,function_module) like CONCAT(‘%‘,#{_parameter}, ‘%‘)

 

方法2;

select distinct function_name,function_module,function_url,date
from agent_function
where function_name LIKE CONCAT(CONCAT(‘%‘, #{_parameter}), ‘%‘) or
function_module LIKE CONCAT(CONCAT(‘%‘, #{_parameter}), ‘%‘)

数据库模糊查询语句(mybatis中运用(xml文件))

原文:http://www.cnblogs.com/mingqi/p/6485352.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!