My below MySQL is giving error.
UPDATE P SET P.author_name = A.name
FROM POSTS AS P INNER JOIN AUTHORS AS A
ON P.author_id = A.id;
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
'FROM POSTS AS P INNER JOIN AUTHORS AS A
ON P.author_id = A.id' at line 2
However, select works fine.
select P.id, a.name
FROM POSTS AS P INNER JOIN AUTHORS AS A
ON P.author_id = A.id;
I am not able to figure out what am I doing wrong, any help?