我正在使用MySQL DB。更新字段值失败
我有一张汽车表,通过描述这张表describe cars
,我看到这张表的“flag
”字段的类型为tinyint(1)
。
我试图通过执行以下命令在该表更新“flag
”字段的所有记录的值:
UPDATE TABLE cars SET flag=0;
,但失败了,错误消息是:
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 UPDATE TABLE cars SET flag=0
为什么失败?如何解决它?