Answers for "mysql join update select from another table"

SQL
6

update left join mysql

UPDATE  t1
LEFT JOIN
        t2
ON      t2.id = t1.id
SET     t1.col1 = newvalue
WHERE   t2.id IS NULL
Posted by: Guest on August-10-2020
0

mysql update table from another table

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'
Posted by: Guest on December-15-2020

Code answers related to "mysql join update select from another table"

Code answers related to "SQL"

Browse Popular Code Answers by Language