[Err] 1055 - Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated colum
2019-02-26 17:00
1081 查看
1055 - Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated columOC]
看了网上的很多的方法,有改配置文件的,有在navicat写执行语句的,我甚至还尝试重装了mysql,自己添加my.cnf那些配置文件,都解决不了呢。怪自己没有好好学数据库聚合函数的知识,就来说一种情况吧。
首先是一个很简单的数据库表
然后我执行一个数据库语句
SELECT * FROM student1 GROUP BY
name
于是就报错了
1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘connor.student1.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by, Time: 0.000000s
那么说通俗一点,就是select的项必须包含在group by的项
即
SELECT a FROM student1 GROUP BY 「a,b,c,d…z」
a是包含在「a,b,c,d…z」这个集合里的
怪自己不耐心,没好好看别人的解释呢hhh
相关文章推荐
- [Err] 1055 - Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated colum
- [Err] 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated colum
- [Err] 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated colum
- mysql:Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column
- #1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this i
- #1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this i
- #1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this i
- MySQL: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column '
- [mysql] Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'lo
- Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'party.uc.
- mysql5.7 报错1055:Expression #1 of SELECT list is not in GROUP BY clause and contains non
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated..
- mysql错误:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'ga
- Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
- Error Code: 1055. Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated
- ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate
- MySQL: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sss
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c