mybatis中的模糊查询用法之一(目前测试可适用于mysql,Oracle,db2,其他数据库待确定) <if test="custName != null and custName != ''"> <bind name="custName_" value="'%'+custName+'%'"/> AND cust_name like #{custName_} </if> 注:在此方法中,custName是外部传进来的字段,custName_ 是模糊查询字段用的别名