一、问题

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. 关于Matlab里面的四个取整(舍入)函数:Floor, Ceil, Fix, Round的解释(转)

    转自http://blog.sina.com.cn/s/blog_48ebd4fb010009c2.html   floor:朝负无穷方向舍入 B = floor(A) rounds the elem ...

  2. 红黑树及其实例JDK中的TreeMap

    红黑树是一种自平衡二叉查找树(binary search tree,BST),红黑树是一种比较复杂的数据结构,红黑树查找.插入.删除元素的时间复杂度为O(log n),n是树中元素的数目.文章的要讲的 ...

  3. oc的静态函数static

    oc的静态函数与类函数不同: 1.静态函数与c++中表现一致,只在模块内部可见: 2.静态函数内部没有self变量: 3.静态函数不参与动态派发:没有在函数列表里:是静态绑定的: @implement ...

  4. Python 日志输出

    昨天的任务是需要记录各操作的性能数据,所以需要用这种格式来输出日志:{"adb_start_time": 1480040663, "tag_name": &qu ...

  5. 论文笔记 Robust face landmark estimation under occlusion

    1. Abstract 现实世界中的人脸很多时候都存在遮挡以及大的形状变化,而目前的人脸关键点检测方法在这种情况下表现欠佳, 因为它们未能提供一种系统的方法来处理异常.因而authors提出一种新的方 ...

  6. module object has no attribute dumps的解决方法

    问题产生原因: python的版本过低,其中的json包年久失修,需要更新 解决方法: 删除就的json包 >>> import json >>> print js ...

  7. Angular动态表单生成(七)

    动态表单生成之拖拽生成表单(上) 这个功能就比较吊炸天了,之前的六篇,都是ng-dynamic-forms自带的功能,可能很多的说明官方的文档都已经写了,我只是个搬运工,而在这篇文章中,我将化身一个工 ...

  8. 小白第一次使用Git随笔

    想研究Git很久了,一直没有找到很好的博客或论坛,近几天工作项目任务没有那么重,就想着找几篇文章把这玩意儿给解决掉,本博客是记录读廖雪峰老师所写的<Git教程>的随笔,以便巩固学习,若想学 ...

  9. BAT面试总结——iOS开发高级工程师

    序言 之前也面试别人,现在轮到自己找工作,怎么说呢,现在轮到自己出去面试,怎么说呢,其实还是挺紧张的,原以为自己不会因此紧张或者焦虑,实际上,还是有的,在没找到合适的工作的时候,甚至晚上有点睡不着觉, ...

  10. Tomcat出现需要输入账号和密码问题

    这里是端口冲突问题: 可以做一下几个解决方案: 第一:更好Tomcat/conf/server.xml文件里面的制定8080端口号,更改为你能记住的端口数: 第二:找到冲突的端口的进程,杀死这个进程, ...