Oracle數據操做之默認0爲' '

 <update id="updateTestInfo" parameterType="">
  update TEST_INFO
  <set>
      <if test="age!= null and age!= ''">
          AGE=#{age}
      </if>
  </set>
  where ID=#{Id} 
 </update>

若是傳的age=0,數據將不會執行update,報數據庫更新失敗,由於Oracle好像默認0爲' '.java

相關文章
相關標籤/搜索