MySQL Error "right syntax to use near '/*100,3), '%') AS `Percentage` FROM INFORMATION_SCHEMA.PROFILING"
I got this weird error after trying to execute a query on a large table:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*100,3), '%') AS
Percentage
FRO开发者_如何学编程M INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID=' at line 1
What does it mean?
EDIT == this is the query
update cities w, states s set w.region_id = s.id
where s.code = w.region and w.country_id = s.country_id
The cities table has around 3 million entries and the states table around 6000
Just for the record I executed this query using a mysql client Navicat.
SQL supports C-style comments:
/* ... */
so it looks like /*100,3
is being interpreted as the beginning of a comment and that comment is wrecking the syntax of the rest of the SQL.
精彩评论