[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds...

INSERT INTO `ftms_active_dealer`(dealer_code,dealer_name,active_id,dealer_state)VALUES('415A1','贺磊'10023','1'),
('31042','魏小彬'10023','1');


[Err] 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 '10023','1'),
('31042','魏小彬'10023','1')' at line 2


网上查了很多资料,大多数该错误发生在create table或者存储过程中列名调用了系统功能函数名或者存储过程语法不对,比如多个','什么的,insert发生问题还真是少见,排查了半天,原来是老眼昏花了....插入明明是4个列,结果values中少一个,导致变成了3个列了。

INSERT INTO `ftms_active_dealer`(dealer_code,dealer_name,active_id,dealer_state)VALUES('415A1','贺磊','10023','1'),
('31042','魏小彬','10023','1');


改正后正常。


你可能感兴趣的:([Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds...)