MyBatis模糊查询LIKE

1.表达式: name like"%"#{name}"%"
==>  Preparing: select * from bbs_brand WHERE namelike"%"?"%"and falg=? limit 0 , 10
==>Parameters: 999(String), 1(Integer)

 
2.表达式: name like '%${name}%'
Preparing:select count(0) from (select * from bbs_brand WHERE name like'%999%' and falg=?) as total
Parameters: 1(Integer)


3. 表达式: name likeconcat(concat('%',#{username}),'%')
==>  Preparing: select count(0) from (select *from bbs_brand WHERE name like
 concat(concat('%',?),'%') and falg=?) as total
==>Parameters: 999(String), 1(Integer)


3. 表达式:name like CONCAT('%','${name}','%')
==>  Preparing: select count(0) from (select *from bbs_brand WHERE name likeCONCAT('%','999','%') and falg=?) astotal
==>Parameters: 1(Integer)

你可能感兴趣的:(Mysql)