在mysql中更新longtext字段

在mysql中更新longtext字段,mysql,Mysql,我试图在mysql客户端中使用一个简单的sql查询更新一个名为“comment”的长文本类型字段,如下所示: Update mytable set comment='Test' 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 s

我试图在mysql客户端中使用一个简单的sql查询更新一个名为“comment”的长文本类型字段,如下所示:

Update mytable set comment='Test' 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 'comment='Test' where id = 1' at line 1
我遗漏了什么吗?请提前感谢。

注释
是一个,如果您想要一个具有该名称的表/字段,您必须引用它(如果是字段,请使用
表.fieldname
语法)。mysql中的默认值是该值的反勾号,因此:

 update mytable set `comment`='Test' where id = 1;
comment
是一个注释,如果您想要有一个具有该名称的表/字段,您必须引用它(或者在字段的情况下使用
table.fieldname
语法)。mysql中的默认值是该值的反勾号,因此:

 update mytable set `comment`='Test' where id = 1;

找到它,就可以用以下方法解决:

update mytable as a set a.comment='Test' where id = 1;

找到它,就可以用以下方法解决:

update mytable as a set a.comment='Test' where id = 1;

谢谢你的回答,已经引用甚至更改了另一个单词,但是仍然会出现相同的错误,知道原因吗?@jsanchezs我不知道,除非你更新你的问题、代码和错误消息谢谢你的回答,已经引用甚至更改了另一个单词,但是仍然会出现相同的错误,知道原因吗?@jsanchezs我不知道,除非更新问题、代码和错误消息