1UPDATE t1
2SET t1.COL1 = t2.COL1, t1.COL2 = t2.COL2
3FROM MY_TABLE AS t1
4INNER JOIN MY_OTHER_TABLE AS t2 ON t1.COLID = t2.ID
5WHERE t1.COL3 = 'OK';
1UPDATE tableB
2INNER JOIN tableA ON tableB.name = tableA.name
3SET tableB.value = IF(tableA.value > 0, tableA.value, tableB.value)
4WHERE tableA.name = 'Joe'
5
1UPDATE MY_TABLE AS t1
2INNER JOIN MY_OTHER_TABLE AS t2 ON t1.COLID = t2.COLID
3SET t1.COL1 = t2.COL1, t1.COL2 = t2.COL2
4WHERE t1.COL3 = 'OK';