Mybatis can operate input parameters data with "if" and "foreach", but how about the data just queried within same Mybatis sql?
case:
table field 1
select filed from table; will get 1
Can Mybatis manage to update field to 2 with this kind of statement? :
<update id="updateField"> 
    select field from table;
    <if test="field != 0 ">
        update table 
        set field = 2
        where field = 1;
    </if>
<update>