传任意带动态标签的sql,!!!
select * from user
<where>
<if test="id != null ">id=#{id}</if>
<if test="name != null and name.length()>0" >and name=#{name}</if>
<if test="gender != null and gender.length()>0">and gender = #{gender}</if>
</where>
根据test的值 来判定是否显示if标签中的语句
你不会是想plsql这个变量带标签传进来吧。
解决了吗