mybatis--插入&更新sql-(mysql)


 
插入&更新sql-mybatis(insertOrUpdate)
loading...
<insert id="insertOrUpdate">

  insert into book_user_counts(urg_user_id, user_id, total_counts, used_counts)

  values

  (#{urgUserId}, #{userId}, #{totalCounts}, #{usedCounts})

  on duplicate key update total_counts= VALUES(total_counts),used_counts= VALUES(used_counts)

</insert>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章