UPDATE bestall SET view = t1.v, rawview = t1.rv
FROM bestall INNER JOIN beststat as t1
ON bestall.bestid = t1.bestid
this query gives syntax error near
'FROM bestall INNER JOIN beststat as t1 ON bestall.bestid = t1.bestid' at line 3
any reasons?
That isn't valid MySQL syntax. It is valid in MS SQL Server, however. For MySQL, use:
UPDATE
bestall
JOIN beststat AS t1 ON bestall.bestid = t1.bestid
SET view = t1.v, rawview = t1.rv
MySQL requires the update tables to come before the SET
clause. See the MySQL UPDATE
syntax reference for full details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With