I have a database with 2 tables. In table1 there are two column:
columnA (autoincrement) and columnB (text)
And in table2: columnC (autoincrement) and columnD (text)
I want to replace (copy) data in columnB with data from columnD only if the autoincrement columns are equals.
I tried with this, but its not correct:
UPDATE table1
SET columnB = (
SELECT columnD
FROM table2 WHERE (
SELECT columnA FROM table1 = SELECT columnC FROM table2)