MyBatis string comparison

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

MyBatis string comparison
[Java] String comparison and && and ||
String
[Java] Speed comparison of string concatenation
String comparison without worrying about NullPointerException
[Java] Correct comparison of String type
String puzzle
Java string
MyBatis memorandum
Use inequality comparison operators in MyBatis SQL
MyBatis story
Basic CRUD comparison between Mybatis and Hibernate
[Java] Comparison of String type character strings
String replacement
Liar String
JSON comparison
Speed comparison test for String, StringBuilder, StringBuffer
The story of low-level string comparison in Java
Why Java String typeclass comparison (==) cannot be used