myBatis查询报错 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查询报错
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
<select id="selectList" parameterType="com.hanilucky.core.vo.Dep"
resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from dep
<where>
<if test="uuid != null">
AND UUID = #{uuid,jdbcType=INTEGER}
</if>
<if test="name != null and name != ''">
AND NAME = #{name,jdbcType=VARCHAR}
</if>
<if test="tele != null and tele != ''">
AND TELE = #{tele,jdbcType=VARCHAR}
</if>
</where>
</select>
标红的NAME是mysql的关键字,解析时报错
修改时加上``引用(数字1左边的键)
<select id="selectList" parameterType="com.hanilucky.core.vo.Dep"
resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from dep
<where>
<if test="uuid != null">
AND UUID = #{uuid,jdbcType=INTEGER}
</if>
<if test="name != null and name != ''">
AND `NAME` = #{name,jdbcType=VARCHAR}
</if>
<if test="tele != null and tele != ''">
AND TELE = #{tele,jdbcType=VARCHAR}
</if>
</where>
</select>
myBatis查询报错 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-设置多个字段值 报错 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 ...
- 插入mysql语句报错: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
插入一个很简单的sql语句时候,mysql一直报错: [SQL] INSERT INTO ORDER ( id, activity_id, order_type, phone, order_amoun ...
- 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 ...
- 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 'group t1,customer t2
### SQL: select t1.gid,t1.gname,t1.gvalue,t1.gtype, t1.gaddress,t1.gmembers, t1.gcode,t1.gphone, t2. ...
- [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 ''<h1 style="text-align: center;">php
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s ...
- 解决ROR 1064 (42000): 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 'creat table study_record( id int(11) not null
之前一直用的好好的,突然就出现了这个错误: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual tha ...
- 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 "-/ ...
- 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 ...
随机推荐
- WinHTTrack
看过<大湿教我写.net通用权限框架(1)之菜单导航篇>之后发生的事 http://www.cnblogs.com/wolf-sun/p/3436585.html 用此工具下载别人整站的图 ...
- C# 混淆 反编译
.net破解一(反编译,反混淆-剥壳) http://www.cnblogs.com/jio92/p/de4dot.html C#学习系列-String与string的区别 http://www.cn ...
- bzoj 1415: [Noi2005]聪聪和可可【期望dp+bfs】
因为边权为1所以a直接bfs瞎搞就行--我一开始竟然写了个spfa #include<iostream> #include<cstdio> #include<queue& ...
- bzoj 4818: [Sdoi2017]序列计数【容斥原理+dp+矩阵乘法】
被空间卡的好惨啊---- 参考:http://blog.csdn.net/coldef/article/details/70305596 容斥,\( ans=ans_{没有限制}-ans{没有质数} ...
- Luogu P1462 通往奥格瑞玛的道路【二分/最短路】
题目背景 在艾泽拉斯大陆上有一位名叫歪嘴哦的神奇术士,他是部落的中坚力量 有一天他醒来后发现自己居然到了联盟的主城暴风城 在被众多联盟的士兵攻击后,他决定逃回自己的家乡奥格瑞玛 题目描述 在艾泽拉斯, ...
- ssh 公钥登录远程主机
ssh-keygen 然后一路回车就可以了 ssh-copy-id user@host user代表用户名,host代表主机地址 然后根据提示输入远程主机的密码,成功,再登录就不用输入密码了
- 区间DP UVA 10739 String to Palindrome
题目传送门 /* 题意:三种操作,插入,删除,替换,问最少操作数使得字符串变成回文串 区间DP:有一道类似的题,有点不同的是可以替换,那么两端点不同的时候可以替换掉一个后成回文, 即dp[j+1][k ...
- Liferay门户部署至Apusic Application Server域
Liferay默认情况下部署在Tomcat容器中,因项目原因需要将Liferay部署至金蝶Apusic Application Server应用服务器中,部署过程如下,特此记录. 1.liferay- ...
- Service官方教程(8)Bound Service示例之2-跨进程使用Messenger
Compared to AIDL When you need to perform IPC, using a Messenger for your interface is simpler than ...
- synchronized(5)修饰语句块之:synchronized(XXX.class)
synchronized(XXX.class)有两种写法 synchronized(XXX.class)或者synchronized(obj.getClass()) Class也是一个类xxx.cla ...