mybatis模糊查询之Like方法
1. 参数中直接加入%%
param.setUsername("%CD%");
param.setPassword("%11%");
select id,sex,age,username,password from person where true AND username LIKE #{username} AND password LIKE #{password}
2. bind标签
select id,sex,age,username,password from person where username LIKE #{pattern}
3. CONCAT
where username LIKE concat(concat('%',#{username}),'%')