插入查询给出错误代码:1064 [英] Insert query giving Error code: 1064

查看:102
本文介绍了插入查询给出错误代码:1064的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的插入查询是:



INSERT INTO merchant_cfg(merchant_id,NAME,VALUE)VALUES(146,'detailed_listing_full.enabled','true') ;



我得到以下结果:



执行1次查询,0次成功,1次错误, 0警告



查询:插入到merchant_cfg(merchant_id,name,value)值(146,'detailed_listing_full.enabled','true')



错误代码:1064

您的SQL语法有错误;检查与MySQL服务器版本对应的手册,以便在第1行'(146,'detailed_listing_full.enabled','true')附近使用正确的语法



执行时间:0秒

转移时间:0秒

总时间:0秒



表模式是:



字段类型空键默认额外

----------- ----- ------- ------ ------ ------- ----------------

id bigint(20)NO PRI(NULL)auto_increment

merchant_id bigint(20)NO MUL(NULL)

名称varchar(50)否(NULL)

value varchar(500)YES(NULL)

解决方案

您需要删除INSERT语句中注意到的不可见字符,该字符位于关键字 VALUES之后(请看一下我的评论a波夫)。

My insert query is:

INSERT INTO merchant_cfg ( merchant_id , NAME, VALUE ) VALUES ​​( 146 , 'detailed_listing_full.enabled' , 'true' ) ;

I am getting the following result:

1 queries executed, 0 success, 1 errors, 0 warnings

Query: insert into merchant_cfg ( merchant_id , name, value ) values ​​( 146 , 'detailed_listing_full.enabled' , 'true' )

Error Code: 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 '​​( 146 , 'detailed_listing_full.enabled' , 'true' )' at line 1

Execution Time : 0 sec
Transfer Time : 0 sec
Total Time : 0 sec

Table schema is:

Field Type Null Key Default Extra
----------- ------------ ------ ------ ------- ----------------
id bigint(20) NO PRI (NULL) auto_increment
merchant_id bigint(20) NO MUL (NULL)
name varchar(50) NO (NULL)
value varchar(500) YES (NULL)

解决方案

You need to remove noticed invisible character in the INSERT statement, which is after keyword VALUES (please take a look at my comments above).


这篇关于插入查询给出错误代码:1064的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆