mysql copy one column to another table code example
Example 1: copy all values of a column to another column in sql in same table
UPDATE table SET columnB = columnA;
Example 2: 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'