文章详情页
shell - mysql中update语句错误
浏览:75日期:2022-06-14 15:15:40
问题描述
使用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:按照报错提示排查,你是想换行把;改成么?
相关文章:
1. python如何不改动文件的情况下修改文件的 修改日期2. node.js - node_moduls太多了3. angular.js - 不适用其他构建工具,怎么搭建angular1项目4. python - django 里自定义的 login 方法,如何使用 login_required()5. css3 - [CSS] 动画效果 3D翻转bug6. mysql优化 - mysql count(id)查询速度如何优化?7. angular.js - Angular路由和express路由的组合使用问题8. mysql主从 - 请教下mysql 主动-被动模式的双主配置 和 主从配置在应用上有什么区别?9. 主从备份 - 跪求mysql 高可用主从方案10. java8中,逻辑与 & 符号用在接口类上代表什么意思
排行榜
![css3 - [CSS] 动画效果 3D翻转bug](http://www.haobala.com/attached/image/news/202304/110831f073.png)