Thank you!
How would I write that if the “datafrom” table only has one column?
Thank you!
How would I write that if the “datafrom” table only has one column?
only one column?
in that case, there wouldn’t be anything to update
I exported all the thread titles from a MS SQL database, and i need to update the “title” column with all the thread titles I exported, having real issues right now (as you can see)
the error message is telling you that the syntax error occurred on the word FROM
the mysql UPDATE statement does not support “FROM” syntax
“FROM” syntax does work in SQL Server, so this is just another fine example of SQL not being portable from one database system to another
the mysql docs (a.k.a. “da manual”) has only one example of joined update syntax, using the deprecated “comma list” syntax –
UPDATE datafrom
, datato
SET datato.price = datafrom.price
WHERE datato.id = datafrom.id
however, i always prefer to write joins using JOIN syntax –
UPDATE datafrom
INNER
JOIN datato
ON datato.id = datafrom.id
SET datato.price = datafrom.price