Mybatis中update中 set 和 if 用法

Mybatis中update中 set 和 if 用法_第1张图片

update admin

  
    admin_name = #{admin_name,jdbcType=VARCHAR},
  
  
    admin_password = #{admin_password,jdbcType=VARCHAR},
  
  
    admin_nickname = #{admin_nickname,jdbcType=VARCHAR},
  
  
    admin_sex = #{admin_sex,jdbcType=VARCHAR},
  
  
    admin_phone = #{admin_phone,jdbcType=VARCHAR},
  
  
    admin_status = #{admin_status,jdbcType=INTEGER},
  
  
    admin_ctime = #{admin_ctime,jdbcType=DATE},
  

where admin_id = #{admin_id,jdbcType=INTEGER}

你可能感兴趣的:(mybaties)