模糊匹配
<select id="findByName" parameterType="string" resultType="Student">
select * from student where student.name like "%"#{name}"%";
<select>
正则
<select id="findByName" parameterType="string" resultType="Student">
select * from student where student.name REGEXP "^["#{name}"]"
</select>
时间: 2024-11-13 13:27:36