Oracle的日期时间范围查询 字段为:字符串类型(char),长度为:10 SELECT * FROM testdatetime t WHERE = AND t.createdate >= '2011-06-01' AND t.createdate <= '2011-07-05'; SELECT * FROM testdatetime t WHERE 1=1 AND to_date(t.createdate,'yyyy-MM-dd') between to_date('2011-06-01'
Mybatis注解开发模糊查询 一般在使用mybatis时都是采用xml文件保存sql语句 这篇文章讲一下在使用mybatis的注解开发时,如何进行模糊查询 模糊查询语句写法(在@Select注解中): where field like CONCAT('%',#{keyWord},'%') 下面是一些错误写法: where title like #{keyword} 这样写不会报错,但无法做到模糊查询. where title like '%#{keyword}%' 这样写会报错