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是关键字段 加``才可以,但加'',这种引号不行

原文地址:https://www.cnblogs.com/pansidong/p/9134942.html