update condition 字段报错

mysql> update tf_user_present set condition="0" where id=1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition="0" where id=1' at line 1
mysql> update tf_user_present set condition='0' where id=1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition='0' where id=1' at line 1
mysql> mysql> update tf_user_present set `condition`='0' where id=1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

 

condition是关键字段 加``才可以,但加'',这种引号不行

posted @ 2018-06-04 19:04  盘思动  阅读(491)  评论(0编辑  收藏  举报