How to use less than equal in MyBatis 3.
<select id="getLog" resultMap="BaseResultMap" parameterType="java.lang.String">
SELECT * FROM(
SELECT * FROM TABLE1
WHERE COL1 =#{COL1,jdbcType=VARCHAR}
ORDER BY DATE DESC
) TABLE2
WHERE ROWNUM <= 20
</select>
I show examples for the Greater Than/Equal Operator and the Less Than/Equal Operators:
ROWNUM >= 20
ROWNUM <= 20
Or, for readability, you can wrap them in CDATA
ROWNUM <![CDATA[ >= ]]> 20
ROWNUM <![CDATA[ <= ]]> 20