<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!-- 命名空间要和接口的全限定名相同 -->
<mapper namespace="com.imp.IStudents">
<select id="selectLike" parameterType="String" resultType="students">
select * from students where name like '%${value}%'
</select> </mapper>

IStudents.xml

org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. 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 'like '%逸%'' at line 1
### The error may exist in com/imp/IStudents.xml
### The error may involve com.imp.IStudents.selectLike-Inline
### The error occurred while setting parameters
### SQL: select * from students name like '%逸%'
### 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 'like '%逸%'' at line 1

错误原因:select语句写错了

select * from students where name like '%逸%'

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的更多相关文章

  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. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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', ...

  7. 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. ...

  8. 解决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 ...

  9. 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 ...

随机推荐

  1. MyBatis笔记03

    1.动态sql 01.if:单独使用if,后面必须有where 1=1 代码:<!-- 需要注意的事项:01. 在xml文件中 特殊字符的使用 &&必须换成 and或者 & ...

  2. Mininet简介

    在Coursera SDN开放课程中,编程作业要用Mininet来完成.这里对Mininet做一个简单的介绍. 什么是Mininet Mininet是由一些虚拟的终端节点(end-hosts).交换机 ...

  3. 关于better-scroll中的问题点

    最近在学习vue和better-scroll结合开发音乐APP,看着视频介绍中在制作slidet轮播图的时候,视频中讲解要想实现无缝滚动,则加入snapLoot:true,但是不可以单独引入它,必须将 ...

  4. python全栈开发-Day3 字符串

    python全栈开发-Day3 字符串 一.按照以下几个点展开字符串的学习  #一:基本使用 1. 用途 #首先字符串主要作用途径:名字,性别,国籍,地址等描述信息2.定义方式 在单引号\双引号\三引 ...

  5. python笔记之函数

    函数 >>> def funTest(param1): ... 'this is function document string.' #正文需要有缩进 ... return par ...

  6. 忘记root密码---单用户模式进入及操作

    修改root密码----------------单用户模式操作 个人原创博客,转载请注明,否则追究法律责任 1,开机后,迅速按下任意键 2,选择第二个:内核,按e 3,在quient后面按空格 1 或 ...

  7. 基于Cesium三维地图项目记录_通视分析功能的实现

    实现了剖面分析功能之后,下面来看看如何实现通视分析,还是基本按照之前的思路实现: 了解软件LocaScape是怎么实现的: 网址如下:http://www.locaspace.cn/V3.0/help ...

  8. 听说你买了 EOS ,连代码什么样都不知道?

    最近发现很多人投资了 EOS,却并不关心 EOS 目前的开发进度和技术细节,如果你投资了 EOS, 还有一定的技术基础,那就更应该关心 EOS 的开发情况了,下面我们就从 EOS 的源代码说起:   ...

  9. 分享PHP中的10个实用函数

    分享PHP中的10个实用函数 PHP的功能越来越强大,里面有着非常丰富的内置函数.资深的PHP程序员对它们可能都很熟悉,但很多参加PHP培训的PHP初学者,仍然对一些非常有用的函数不太熟悉.这篇文章里 ...

  10. CXF-01: WebService的第一个例子

    HelloWorld.java: package com.war3.ws; import javax.jws.WebService; @WebService public interface Hell ...