Mybatis 中的insertOrUpdate操作
<insert id="insertOrUpdate"> insert into base_person (pname, idcard, gender, nation, source_flag, create_time) values <foreach collection="list" item="p" index="index" separator=","> (#{p.pname}, #{p.idcard}, #{p.gender}, #{p.nation}, #{p.sourceFlag}, #{p.createTime}) </foreach> ON DUPLICATE KEY UPDATE pname=values(pname), idcard=values(idcard), gender=values(gender), nation=values(nation) </insert>
相关推荐
王艺强 2020-11-17
anchongnanzi 2020-09-21
84296033 2020-09-15
heimu 2020-08-02
herohope 2020-07-18
mrandy 2020-07-04
Jaystrong 2020-06-27
89921334 2020-06-26
debugjoker 2020-06-17
Linkaibin 2020-06-14
fanhuasijin 2020-06-14
Laxcus大数据技术 2020-06-13
hanshangzhi 2020-06-10
rainchxy 2020-06-07
Jerry 2020-06-01
lilygg 2020-05-29
lclcsmart 2020-05-27