模糊查询like语句该怎么写?
(1)'%${question}%' 不推荐
(2)CONCAT('%',#{question},'%') 推荐
(3) NAME like '%'|| #{name} || '%'
(4)使用bind
<bind name="pattern" value="'%' + _parameter.username + '%'" />
select id,sex,age,username,password
from person
where username LIKE #{pattern}