on duplicate key update (存在即更新)
存在及更新,
insert into user (id,name,age) values (#{id},#{name},#{age})
on duplicate key update name=value(name),age=value(age);
来自,防止mysql死锁问题:https://www.cnblogs.com/yidengjiagou/p/16425196.html
存在及更新,
insert into user (id,name,age) values (#{id},#{name},#{age})
on duplicate key update name=value(name),age=value(age);
来自,防止mysql死锁问题:https://www.cnblogs.com/yidengjiagou/p/16425196.html