UPDATE bestall SET view = t1.v, rawview = t1.rv
FROM bestall INNER JOIN beststat as t1
ON bestall.bestid = t1.bestid
此查询给附近的语法错误
'FROM bestall INNER JOIN beststat as t1 ON bestall.bestid = t1.bestid' at line 3
任何原因?
UPDATE bestall SET view = t1.v, rawview = t1.rv
FROM bestall INNER JOIN beststat as t1
ON bestall.bestid = t1.bestid
此查询给附近的语法错误
'FROM bestall INNER JOIN beststat as t1 ON bestall.bestid = t1.bestid' at line 3
任何原因?
这不是有效的MySQL语法。 这是 MS SQL Server中有效,但是。 对于MySQL,使用方法:
UPDATE
bestall
JOIN beststat AS t1 ON bestall.bestid = t1.bestid
SET view = t1.v, rawview = t1.rv
MySQL的需要更新的表来的前SET
子句。 见MySQL的UPDATE
语法参考的全部细节。
试着这样说:
UPDATE bestall INNER JOIN beststat as t1
ON bestall.bestid = t1.bestid SET view = t1.v, rawview = t1.rv