![](/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.