📅  最后修改于: 2022-03-11 15:05:11.209000             🧑  作者: Mango
UPDATE tableB
INNER JOIN tableA ON tableB.name = tableA.name
SET tableB.value = IF(tableA.value > 0, tableA.value, tableB.value)
WHERE tableA.name = 'Joe'