![](/img/trans.png)
[英]MYSQL: SELECT and UPDATE in the same statement won't work - 1064 error
[英]MySQL error 1064 in update statement
mysql>更新表product_tb set quantity = 90其中pid = 2;
錯誤1064(42000):您的SQL語法有錯誤; 查看與您的MySQL服務器版本對應的手冊,以便在'table product_tb set quantity = 90附近使用正確的語法,其中pid = 2'在第1行
從查詢中刪除table
關鍵字,因為這里不需要它。
嘗試這個::
Update product_tb set quantity=90 where pid=2
Update table product_tb set quantity=90 where pid=2;
至
Update product_tb set quantity=90 where pid=2;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.