sql:update + join

UPDATE tablea a
JOIN tableb b
SET a.val = b.val
WHERE b.id = a.id

原文地址:https://www.cnblogs.com/go4mi/p/6297054.html