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 'group t1,customer t2
### SQL: select t1.gid,t1.gname,t1.gvalue,t1.gtype, t1.gaddress,t1.gmembers, t1.gcode,t1.gphone, t2.cid ,t2.cname,t2.cgcode from group t1,customer t2 where t1.gcode = t2.cgcode and t1.gid=4;
### Cause: com.mysql.jdbc.exceptions.jdbc4.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 'group t1,customer t2
where t1.gcode = t2.cgcode and t1.gid=4' at line 5
经常我们会运行sql时会报sql语句出错,经常看半天发现sql语法没有错,后来发现是表名是关键字,例如group、user导致了sql出错
下次出错,一定要注意关键字
解决办法:
group两边加上·,就是esc下面那个键·,数字1左边那个·,变成·group·就好了
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 'group t1,customer t2的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 "-/ ...
- 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 'groups)VALUES('1','hh','hh@163.com','Boss')' at line 1
mysql8.0版本 在已存在的表里插入一条数据 insert INTO api_user(id,username,email,groups)VALUES('1','hh','hh@163.com', ...
- 解决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 'order (order_name, customer)
在学习hibernate一对多映射关系时,根据视频学习的时候,例子是顾客和订单的问题,一个顾客有多个订单.按照视频中的敲代码出现了You have an error in your SQL synta ...
- mybatis批量更新update-设置多个字段值 报错 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
mybatis批量更新update-设置多个字段值 2016年08月01日 12:49:26 姚一号 阅读数:29539 标签: mysql mybatis批量更新批量更新allowMultiQuer ...
随机推荐
- hibernate学习(缓存)
缓存,介于应用程序和永久数据存储源之间,作用是为了降低应用程序对物理数据源访问的频率,从而提高应用的运行性能. 例如我们cpu执行效率每秒处理的数据高达上千兆,而我们的硬盘读取速度却没那么高,读取几百 ...
- socket通信的遇到的问题1
/*使用select对fd可读写,格式*/ while(ctrl){ //// FD_ZERO(&readSocketSet); FD_SET(readSocketFd,&readSo ...
- nc_netcat命令
它可以打开TCP连接.发送UDP数据包.监听任意TCP和UDP端口,进行端口扫描,处理IPv4和IPv6 这个命令适用于写脚本 nc -z -w 10 ip port -z:指定NC只应扫描侦听守护 ...
- 循环结构 : while .. for
# ###循环结构 : while .. for ''' while 循环 可以提高代码的效率,减少代码的冗余 while 条件表达式: code1 code2 如果条件表达式成立,返回True , ...
- GET和POST两种基本请求方法(转自博主--在途中#)
GET和POST两种基本请求方法的区别 GET和POST是HTTP请求的两种基本方法,要说它们的区别,接触过WEB开发的人都能说出一二. 最直观的区别就是GET把参数包含在URL中,POST通过req ...
- oracle中 sql%rowcount 用法
sql%rowcount用于记录修改的条数,必须放在一个更新或者删除等修改类语句后面执行,select语句用于查询的话无法使用, 当你执行多条修改语句时,按照sql%rowcount 之前执行的最后一 ...
- react组件实现扩展知识
react-redux redux-thunk 实现异步action, ajax,定时器 redux-gen 利用生成器,实现middleware react-router-redux react-r ...
- DNS 本质
DNS 本质: 层级分布式数据库
- mysql_study_4
索引 ALTER TABLE 表名字 ADD INDEX 索引名 (列名); CREATE INDEX 索引名 ON 表名字 (列名); 索引的效果就是加快查询速度,当表中数据不够多的时候是感受不出他 ...
- c语言的一些易错知识积累
1. #ifdef 和#if defined 的区别: 后者可以组成复杂的预编译条件,而如果判断的是单个宏定义的时候,两种用法的效果都是一样的. 2.#if 0 { code }#endif ...