概述
在使用mybatis plus对数据进行时间查询的时候出现如下错误:
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 ‘WHERE date_format(createTime, ‘%Y-%m-%d’) BETWEEN ‘2021-02-22’ AND ‘2021-02-23’’ at line 5
解决
提示是在WHERE附近,仔细检查了一下,是没有写表名,把表名加上就好了