一、问题

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. C++ 读书笔记2

    dfadsfa body { font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 1.6; padding ...

  2. 加速安装 Sharepoint 2013 SP1

    第一次安装把人吓了一跳,居然花了5个半小时.想想有一大堆服务器要升级,不得不想想有什么加速的办法. 试了好几种方法,以下的办法最为简单 1:停止 IIS ADMIN,WWW 服务 2:停止所有 sha ...

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

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

  4. [2018HN省队集训D1T1] Tree

    [2018HN省队集训D1T1] Tree 题意 给定一棵带点权树, 要求支持下面三种操作: 1 root 将 root 设为根. 2 u v d 将以 \(\operatorname{LCA} (u ...

  5. PostProcess崩溃

    1.__debugbreak 功能暂停程序执行,打开调试器,进入调试模式. 2.重要参考: https://blog.csdn.net/phenixyf/article/details/4930457 ...

  6. 使用C#操作Oracle Spatial的SDO_GEOMETRY对像(读取和写入)

    首先,这个需要使用ODAC,也就是Oracle.DataAccess.dll,新出的托管Oracle.ManagedDataAccess.dll不支持Object Type,无法使用 ODAC下载地址 ...

  7. iOS 开源库系列 Aspects核心源码分析---面向切面编程之疯狂的 Aspects

    Aspects的源码学习,我学到的有几下几点 Objective-C Runtime 理解OC的消息分发机制 KVO中的指针交换技术 Block 在内存中的数据结构 const 的修饰区别 block ...

  8. oc消息转发:forwardInvocation、签名、参量个数、SEL 相关测试

    结论1.签名的参量类型伪造不正确会导致崩溃. 结论二.签名个数不对可能会导致参量丢失. 结论三:在签名配置正确的情况下,系统会将函数调用的所有信息打包到NSInvocation准备转发: - (voi ...

  9. EOS资料收集

    柚子(EOS)可以理解为Enterprise Operation System,即为商用分布式应用设计的一款区块链操作系统.EOS是EOS软件引入的一种新的区块链架构,旨在实现分布式应用的性能扩展.注 ...

  10. python基础整理3——前端

    html概述和基本结构 html概述 HTML意思是超文本标记语言 html基本结构 一个html的基本结构如下: <!DOCTYPE html> <html lang=" ...