I have two tables one is called Players
and the other is importdata
. The importdata
table consists of two fields the player id (PID) and the photo (Photo).
In the Players
table I created a column for the Photo field to be imported into. What I would like to do is take the Photo field from the importdata
table and insert it into the photo_high
field in the Players
table where the PID fields match.
I thought something like this would work, but it says that there is an unknown column.
INSERT INTO (`photo_high`)
SELECT PID, Photo
FROM importdata
WHERE Players.PID = importdata.PID
Can this be achieved with an SQL statement or do I have to write some kind of script? Any guidance would be great.
Players
PID
photo_high (empty)
importdata
PID
Photo (full of content)