方式一:update 更新表 set 字段 = (select 参考数据 from 参考表 where 更新表.id = 参考表.id)
update a set aaa = (select aaa from b where a.id = b.id),bbb = (select bbb from b where a.id = b.id)
方式二:update 更新表,参考表 set 更新表数据 = 参考表数据 where 更新表.id = 参考表.id
update a,b set a.aaa = b.aaa,a.bbb = b.bbb where a.id = b.id;
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。