Oracle中使用bind的写法
<select id="selectUser" resultType="user" parameterType="user">
<bind name="pattern" value="'%' + username + '%'" />
select id,sex,age,username,password
from user
where username LIKE #{pattern}
</select>
Oracle中不使用bind的写法
<select id="selectUser" resultType="user" parameterType="user">
select id,sex,age,username,password
from user
where username LIKE CONCAT(CONCAT('%',#{username}),'%')
</select>