异常信息为FUNCTION xxx.sum does not exist,意思为找不到sum()方法。
异常信息
java.sql.SQLSyntaxErrorException: FUNCTION xxx.sum does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
解决思路:
检查mybatis的xml文件sql写法。
- 错误写法:仔细检查,sum和(*)之间是否多个空格。
select sum (*) from student
- 正确写法:
select sum(*) from student