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子句之前。有关完整的详细信息,请参见MySQLUPDATE语法参考。
SET
UPDATE