哈哈, 这个情况我也遇到过。
估计 MySQL 某些版本有这个毛病。
mysql> select SUM ( sale_money ) FROM sale_report
ERROR 1630 (42000): FUNCTION test.SUM does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
去除空格以后:
mysql> select SUM(sale_money) FROM sale_report
+-----------------+
| SUM(sale_money) |
+-----------------+
| 741407.00 |
+-----------------+
1 row in set (0.00 sec)
原因估计是 SUM 后面,不能有空格的缘故……估计 MySQL 某些版本有这个毛病。
1
2
3
4
5
6
7
8
9
10
11
mysql>select SUM ( sale_money ) FROM sale_report
ERROR 1630 (42000): FUNCTION test.SUM does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
去除空格以后:
mysql>select SUM(sale_money) FROM sale_report
+-----------------+
| SUM(sale_money) |
+-----------------+
| 741407.00 |
+-----------------+
1 row in set (0.00 sec)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)