您的位置:首页 > 其它

ibatis中使用like模糊查询

2018-03-21 10:06 295 查看
使用连接符。不过不同的数据库中方式不同。

mysql: 

select  *  from table1 where name like concat('%', #name#, '%')


 oracle:

select  *  from table1 where name like '%' || #name# || '%'


 sql server:

select  *  from table1 where name like '%' + #name# + '%'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ibatis