一、问题

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. zabbix日常监控项nginx(五)

    1.开启nginx监控 2.编写脚本来进行数据采集 3.设置用户自定义参数 4.重启zabbix-agent 5.添加item.创建图形.创建触发器 6.创建模板 注:第一次使用可以按需求制定好模板, ...

  2. 《关于oracle数据库的勒索病毒的预警》

    近日,接部分机构反馈和安全厂商提醒,针对oracle数据库的勒索病毒攻击数量增加.该病毒存在较长潜伏期,会根据数据库实例创建时间距今是否满足1200天决定是否发起攻击.攻击通过执行恶意SQL脚本,加密 ...

  3. 字符串,元组,列表; 切片&range

    总结:字符串: "" 组成元组: () 组成列表: [] 组成 切片 中括号冒号: [5: 0: -2] # print(s2[5:0:-2]) 此步长为-2,则从右往左取, 则a ...

  4. js 获取后缀参数

    function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&] ...

  5. nodejs11安装教程(升级最新版本)

    nodejs需要不断升级,那么电脑如何安装nodejs11呢,下面将通过亲身实践来详细介绍   工具/原料   电脑 nodejs11安装包 方法/步骤     访问node11官网,下载安装包,如下 ...

  6. 第五周:MySQL数据库

    首先,先了解一下数据库的基本概念要点: 数据库是数据存储的集合,表示数据结构化的信息 列存储表中的信息 行存储表的明细 主键是表中的唯一标识 主键不具备业务意义 在实际操作中,对表的主键不做强制性要求 ...

  7. Golang - 数据库操作

    1. 下载安装包 go get github.com/Go-SQL-Driver/MySQL go install github.com/Go-SQL-Driver/MySQL 2. 连接池 This ...

  8. python 模拟126邮箱登陆

    #coding=utf-8from selenium import webdriverimport time mydriver=webdriver.Firefox()mydriver.get(&quo ...

  9. PAT乙级1030

    1030 完美数列 (25 分)   给定一个正整数数列,和正整数 p,设这个数列中的最大值是 M,最小值是 m,如果 M≤mp,则称这个数列是完美数列. 现在给定参数 p 和一些正整数,请你从中选择 ...

  10. java中跳出循环的方式

    continue:跳出本次循环,继续下一次循环,也就是不执行本次循环continue下面的语句. 例如:"will you"不会被打印 for(int i = 0; i< 8 ...