Information was diverged in the description of dynamic SQL in xml using MyBatis, so I am checking what to do actually Can I use single quotes?
There was a report that other members confirmed it and it was useless. .. .. I could not confirm what kind of Exception occurred. .. .. Although it is a char type once, it can only be entered as a business specification, so it is cleared without single quotation Will be confirmed when needed again
<!--Exception occurred-->
select * from table
<if test="args != '9'">
where colum = #{args}
</if>
<!--Correspondence once-->
select * from table
<if test="args != 9">
where colum = #{args}
</if>
Recommended Posts