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
FROM INFORMATION_SCHEMA.PROFILING WHERE QUERY_ID=' at line 1您的SQL語法有錯誤;查看與您的MySQL服務器版本對應的手冊,以便在'/ * 100,3)附近使用正確的語法,'%')AS FROM FROM INFORMATION_SCHEMA.PROFILING的百分比WHERY QUERY_ID ='在第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
城市表有大約300萬個條目,州表大約6000個
Just for the record I executed this query using a mysql client Navicat.
只是為了記錄我使用mysql客戶端Navicat執行了這個查詢。
2
SQL supports C-style comments:
SQL支持C風格的注釋:
/* ... */
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.
因此看起來/ * 100,3被解釋為注釋的開頭,而該注釋正在破壞SQL其余部分的語法。
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2011/05/23/2f51b65f5e738586c1a7be3d22ff9cbd.html。