where (title 这里多了个“(”
mybatis模糊查询时遇见的问题,网上都说这么查,但是我运行起来是错的啊,求救
5这是SQL代码,用的时mybatis的注解
@Select("select * from t_chushou where (title like CONCAT('%',#{0},'%')")
错误信息是:
SQL: select * from t_chushou WHERE (title like CONCAT("%",?,"%")
### 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 '' at line 2
我用数据库软件直接运行代码段,发现第一个‘%’后面就好像没用了。。。大神帮我看看呗
- 点赞
- 写回答
- 关注问题
- 收藏
- 复制链接分享
- 邀请回答
5条回答
为你推荐
- mybatis模糊查询时遇见的问题,网上都说这么查,但是我运行起来是错的啊,求救
- java
- 5个回答