MyBatis中设置模糊查询
在sql语句中,where查询条件需要使用 name like concat('%',#{name},'%') 这种格式。
<select id="" resultType="string">
SELECT
name
FROM
student
WHERE
name like concat('%',#{name},'%')
</select>