文章詳情頁
shell - mysql中update語句錯誤
瀏覽:73日期: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:按照報錯提示排查,你是想換行把;改成么?
相關文章:
排行榜
