您的位置:首页 > 博客中心 > 数据库 >

mysql update from 子查询

时间:2022-03-10 17:44

mssql 子查询更新

update log set uin= b.uin
from log a,logs b
where a.accountuin = b.accountuin

mysql 不支持 update 子查询更新

找了半天资料 终于搞定了...

update `log` a inner join `logs` b on a.`accountuin` = b.`accountuin`
set a.`uin` = b.`uin` where a.`accountuin` = b.`accountuin`

这样就能 将查询出来的字段批量更新过去了...

mysql update from 子查询,布布扣,bubuko.com

热门排行

今日推荐

热门手游