我有一个包含以下字段的mysql表:
id, desc, value, people, amount, weight
按照上面的顺序运行以下
update match1 set weight = 5 where desc = 'fat' and id != '6';
follwoing是我得到的错误信息:
**#1064 - 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 'desc = 'bat' and id = 6' at line 1
有人可以告诉我这是错的吗?
答案 0 :(得分:1)
列desc
是mysql中的关键字。使用反引号即
where `desc` = 'fat'