I have 2 tables: Table1 (entry, x, y) Table2 (entry, x, y)
I want to update Table1.position1, sot it = Table2.Position1 where entries are the same(there are different entries in both tables, but some are the same)
So what I have tried to do:
update Table1 SET Table1.x = Table2.x where Table1.entry=Table2.entry;
But got error:
Unknown column 'Table2.entry' in 'where clause'
So then I tried to do another query:
update Table1 SET Table1.x=(select x from Table2) inner join Table2 on Table1.entry=Table2.entry;
But again got error
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 'inner join Table2 on Table1.entry=Tab' at line 1
Any of the answers in google didn't gave me satisfactory result, so I hope someone can help. Thank you.