码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2016-03-03 19:37:54      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:mysql   [err] 1064   

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...

标签:mysql   [err] 1064   

原文地址:http://suifu.blog.51cto.com/9167728/1747283

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!