<!-- oracle -->
<selectid="searchUserBySearchName"parameterType="java.lang.String"resultType="com.urm.entity.User">
select * from t_user where user_name like CONCAT('%',#{search_name},'%')
</select>
<!-- 或者 -->
<selectid="searchUserBySearchName"parameterType="java.lang.String"resultType="com.urm.entity.User">
select * from t_user where user_name like '%'||#{search_name}||'%'
</select>
<!-- mysql -->
<selectid="searchUserBySearchName"parameterType="java.lang.String"resultType="com.urm.entity.User">
select * from t_user where user_name like CONCAT('%',#{search_name},'%')
</select>
<!-- sql server -->
<selectid="searchUserBySearchName"parameterType="java.lang.String"resultType="com.urm.entity.User">
select * from t_user where user_name like '%'+#{search_name}+'%'
</select>
<!-- db2 -->
<selectid="searchUserBySearchName"parameterType="java.lang.String"resultType="com.urm.entity.User">
select * from t_user where user_name like CONCAT('%',#{search_name},'%')
</select>
<!-- 或者 -->
<selectid="searchUserBySearchName"parameterType="java.lang.String"resultType="com.urm.entity.User">
select * from t_user where user_name like '%'||#{search_name}||'%'
</select>