一、问题

mysql插入数据时报错

sql如下

insert into t_sysconfig (servercode,key,value,remark,updatetime) values ("com","min.recommend.count","5","新增offer时从recommend表查到数据的最小数,小于这个数时从callback表补",NOW())

二、原因及解决办法

  • 原因:关键字key问题

  • 解决办法:在关键字前后加上符号`就好了

修正后的sql:

insert into t_sysconfig (servercode,`key`,value,remark,updatetime) values ("com","min.recommend.count","5","新增offer时从recommend表查到数据的最小数,小于这个数时从callback表补",NOW())

执行结果:

insert into t_sysconfig (servercode,`key`,value,remark,updatetime) values ("com","min.recommend.count","5","新增offer时从recommend表查到数据的最小数,小于这个数时从callback表补",NOW())
Affected rows: 1
时间: 0.203s

check the manual that corresponds to your MySQL server version for the right syntax to use near的更多相关文章

  1. ERROR: 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 'type=InnoDB' at line 7

    问题: 使用hibernate4.1.1,数据库使用mysql5.1.30,使用hibernate自动生成数据库表时,hibernate方言使用org.hibernate.dialect.MySQLI ...

  2. C# Mysql 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 ????

    有几年没用过MySql数据了,今天在使用C#访问MySql数据库时出现了一个小插曲. 错误提示: You have an error in your SQL syntax; check the man ...

  3. 遇到的check the manual that corresponds to your MySQL server version for the right syntax错误

    遇到的check the manual that corresponds to your MySQL server version for the right syntax错误. 结果发现是SQL关键 ...

  4. MySql 执行语句错误 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

    关于用Power Designer 生成sql文件出现 错误  [Err] 1064 - You have an error in your SQL syntax; check the manual ...

  5. MySQL遇到check the manual that corresponds to your MySQL server version for the right syntax错误

    用MySQL新建了一个Order表,插入了一条数据.总是显示 You have an error in your SQL syntax; check the manual thatcorrespond ...

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

    mysql中如果字段使用了关键字,在插入和更新时会提示 You have an error in your SQL syntax; check the manual that corresponds ...

  7. MySQL check the manual that corresponds to your MySQL server version for the right syntax错误

    地化GO的时候一直遇到一个错误就是check the manual that corresponds to your MySQL server version for the right syntax ...

  8. MySQLSyntaxErrorException: 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数据库时打印出来的异常: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSynt ...

  9. check the manual that corresponds to your MySQL server version for the right syntax处理方案

    check the manual that corresponds to your MySQL server version for the right syntax:代码出现这样的bug,就要注意你 ...

  10. 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 'like '%逸%'' at line 1

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-/ ...

随机推荐

  1. 显示iOS所有系统字体

    显示iOS所有系统字体 源码地址: https://github.com/YouXianMing/UI-Component-Collection 效果图: 便于你开发中寻找适合自己的字体, demo中 ...

  2. 搜索菜单栏侧滑效果控件SearchView

    搜索菜单栏侧滑效果控件SearchView 本人视频教程系类   iOS中CALayer的使用 效果1: 效果2: 项目中用到的图片 bgImg@2x.png: 源码: SearchView.h + ...

  3. 多台服务器共享session问题

    在现在的大型网站中,如何实现多台服务器中的session数据共享呢 当使用多台服务器架设成集群之后,我们通过负载均衡的方式,同一个用户(或者ip)访问时被分配到不同的服务器上,假设在A服务器登录,如果 ...

  4. MacOS(苹果电脑&苹果系统)连接京瓷300i 打印机

    前往京瓷官网下载打印机驱动: http://www.kyoceradocumentsolutions.com.cn/support/mfp/download/taskalfa300i.html 驱动安 ...

  5. matlab规定小数点保留4位且非科学计数法格式存储txt

    matlab 不保存为科学计数法 http://blog.sciencenet.cn/blog-472136-402727.html 经常在表示matlab值时,它总会把一些小于1的大于1000的数使 ...

  6. git did not exit cleanly (exit code 128)

    github,pull和push的时候出问题,提示git did not exit cleanly (exit code 128) 使用HTTP格式的url,不要使用SSH格式的url,在官网上赋值下 ...

  7. [2018HN省队集训D5T2] party

    [2018HN省队集训D5T2] party 题意 给定一棵 \(n\) 个点以 \(1\) 为根的有根树, 每个点有一个 \([1,m]\) 的权值. 有 \(q\) 个查询, 每次给定一个大小为 ...

  8. [T-ARA][I'm so bad]

    歌词来源:http://music.163.com/#/song?id=22704433 作曲 : 김태현 , 조영수 [作曲 : k/gim-Tae-hyeon , c/jo-yeong-su] 作 ...

  9. JAVA 泛型通配符 ? EXTENDS SUPER 的用法

    1. <? extends Hero> ArrayList heroList<? extends Hero> 表示这是一个Hero泛型或者其子类泛型heroList 的泛型可能 ...

  10. Day1 MySql安装和基本操作

    数据和数据库 1.数据:客观事物的符号表示. 2.存储介质:纸,光盘,磁盘,u盘,云盘… 3.存储的目的:检索(查询) 存储数据量加大,导致检索的难度升高. 4.数据库(DB:database):按照 ...