mybatis查询报错ORA-00920: 无效的关系运算符

Mybatis 查询报错java.sql.SQLSyntaxErrorException: ORA-00920: 无效的关系运算符

当使用Mybatis-Plus的注解 @Select("select * from temp where creattime >= sysdate ") 查询数据时会报错ORA-00920: 无效的关系运算符

原因是:

在使用 &gt;= 替代 >= 时,应在查询语句前添加 <script></script>

例如:

@Select("<script > select * from temp where creattime &gt;= sysdate </script>")

此时查询语句就会变为 select * from temp where creattime >= sysdate

猜你喜欢

转载自blog.csdn.net/u013478983/article/details/113700168