1.使用mysql内置机制 uid为主键,当uid存在时进行更新,不存在进行插入 insert into student(uid, name) values (#{uid,jdbcType=BIGINT},#{),jdbcType=VARCHAR}) ON DUPLICATE KEY UPDATE name= #{name,jdbcType=VARCHAR}
转载于:https://my.oschina.net/gaomq/blog/3049964
1.使用mysql内置机制 uid为主键,当uid存在时进行更新,不存在进行插入 insert into student(uid, name) values (#{uid,jdbcType=BIGINT},#{),jdbcType=VARCHAR}) ON DUPLICATE KEY UPDATE name= #{name,jdbcType=VARCHAR}
转载于:https://my.oschina.net/gaomq/blog/3049964