您的位置:首页技术文章
文章详情页

shell - mysql中update语句错误

【字号: 日期:2022-06-14 15:15:40浏览:78作者:猪猪

问题描述

使用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

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

问题解答

回答1:

where 前面多了个分号啊

回答2:

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

相关文章: