今天在使用myBatis配置文件写sum脚本,执行是报错,错误信息为:ause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION test.SUM does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
xml文件中配置脚本为:
SELECT SUM (times) FROM test01
原因:SUM同求和字段直接有空格
解决:将空格去掉就可以了