title: How could I use update statement using <if> statement on MyBatis
body: <p>I want to know how to use if statement like below case</p>
  
  <pre><code>&lt;update id="update"
      parameterType="com.MyClass"&gt;
      UPDATE
          Board SET Status = 1
      &lt;where&gt;
          &lt;if test="A != null and A.length() &gt; 0"&gt;AND A = ${A}&lt;/if&gt;
      &lt;/where&gt;
  &lt;/update&gt;
  </code></pre>
  
  <p>This statement works when A!=null and A.length() > 0.</p>
  
  <p>But if A==null, then update whole rows set 1 cause there is no where conditions.</p>
  
  <p>Is there any way to update if there is proper condition, otherwise skip or ignore?</p>
  
  <p>thanks</p>