I have two tables that can be joined on a key. All I want to do is to update one of the attributes of table1 using a condition on table 2
UPDATE t1
INNER JOIN t2
ON t1.id= t2.id
SET t2.column3 = 'dte'
WHERE t1.column = 456
I have two tables that can be joined on a key. All I want to do is to update one of the attributes of table1 using a condition on table 2
UPDATE t1
INNER JOIN t2
ON t1.id= t2.id
SET t2.column3 = 'dte'
WHERE t1.column = 456
i think SET clause should be after UPDATE clause then your JOIN. also you are trying to update column3 from table t2, the table t2 should be in the UPDATE clause since that is the one you will updating
UPDATE t2
SET column3 = 'dte'
INNER JOIN t1
ON t2.id = t1.id
WHERE t1.column = 456