mysql update table from another table

Solutions on MaxInterview for mysql update table from another table by the best coders in the world

showing results for - "mysql update table from another table"
Lucas
17 Oct 2017
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