当前位置:   article > 正文

出现User 1055 - Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated 解决方法

1055 - expression #2 of select list is not in group by clause and contains n

1. 问题所示

执行Sql的时候,出现如下问题

1055 - Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated 
column 'easy-admin.students.age' which is not functionally dependent on columns in GROUP BY clause; 
this is incompatible with sql_mode=only_full_group_by
  • 1
  • 2
  • 3

截图如下:

在这里插入图片描述

2. 原理分析

单纯抛开这个语句,通用的分析此Bug

这个错误是因为 MySQL 的 sql_mode 设置了 only_full_group_by

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号