1. 首页
  2. 操作系统
  3. Solaris
  4. Mysql升级到5.7后遇到的group by查询问题解决

Mysql升级到5.7后遇到的group by查询问题解决

上传者: 2020-12-17 10:52:15上传 PDF文件 50.79KB 热度 25次
发现问题 最近在将mysql升级到mysql 5.7后,进行一些group by 查询时,比如下面的 SELECT *, count(id) as count FROM `news` GROUP BY `group_id` ORDER BY `inputtime` DESC LIMIT 20 就会报如下错误: SELECT list is not in GROUP BY clause and contains nonaggregated column ‘news.id' which is not functionally dependent on columns in GROUP BY c
用户评论