I have 2 table, in table A
I have id_A
and region_A
, in table 2 I have id_B
and region_B
I want to set region_A = region_B
when id_A
is equal id_B
I read this question
and tried :
UPDATE A SET A.`region` = B.region
FROM A
inner join B on A.id_a = B.id_b
I got this error
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM A inner join B on A.id_a' at line 1
How can update my table A ?