mysql中update语句错误

hhxx
  • 569

使用shell操作mysql,用如下命令update

mysql -h10.134.72.72 -uroot -e "use GalaxyConfig; UPDATE GalaxyGPPanda SET count=count+1205914; WHERE(time='2017-02-27 18:00:00' AND type='pv' AND service='news')"

结果报错:

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for theright syntax to use near 'WHERE(time='2017-02-27 18:00:00' AND type='pv' AND service='news')' at line 1

请教各位这个错误是哪里啊?

回复
阅读 2.5k
2 个回答

where 前面多了个分号啊

按照报错提示排查,你是想换行把;改成么?

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏