那么这个查询有什么问题:
INSERT `ttf` SET `weight_id` = 4 WHERE `weight_id` = 4
来自官方 MySQL 手册的语法参考:
INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name
[PARTITION (partition_name,...)]
SET col_name={expr | DEFAULT}, ...
[ ON DUPLICATE KEY UPDATE
col_name=expr
[, col_name=expr] ... ]
来源:https ://dev.mysql.com/doc/refman/5.6/en/insert.html
我的查询返回错误:
SQL Error (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 'WHERE `weight_id` = 4' at line 1
是的,我有 MySQL 服务器 v.5.6,我知道通常使用的 INSERT [...] VALUES(...) 语法,但我想使用 SET 语法。