原文:must appear in the GROUP BY clause or be used in an aggregate function

今天在分组统计的时候pgsql报错 must appear in the GROUP BY clause or be used in an aggregate function,在mysql里面是可以的,但是pgsql报错,我去stackoverflow查询了一下,发现有人遇到过和我一样的问题,这是pgsql一个常见的聚合问题,在SQL 标准以前,选择显示的字段必须出现在在 GROUP BY 中。 ...

2018-11-09 11:47 0 8441 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM