(18)mysql批量更新

2020-10-23  本文已影响0人  hedgehog1112

1、replace into 批量更新:没有insert,有则del再insert

2、insert into ...on duplicate key update批量更新:只update重复记录,不改变其它字段

3.创建临时表,先更新临时表,然后从临时表中update:要用户有temporary 表create 权限。便于运维,运营更新

4、mysql 自带的语句构建批量更新

更新多值,稍加修改:

https://www.cnblogs.com/mslagee/p/6509682.html

上一篇 下一篇

猜你喜欢

热点阅读