
update B b set b.value=(select max(a.value) from A a where b.key=a.key)
where exists(select 1 from A c where b.key=c.key)UPDATE A a,(select a.`key`,b.`value` from A INNER JOIN B on a.`key`=b.`key`) b
SET a.`value` = b.`value` WHERE a.`key` = b.`key`发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/119566.html原文链接:https://javaforall.cn