MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
‘rpacloudsit.t.app_id‘ which is not functionally dependent on columns in GROUP BY clause;
this is incompatible with sql_mode=only_full_group_by

MySQL有any_value(field)函数,他主要的作用就是抑制ONLY_FULL_GROUP_BY值被拒绝

官方有介绍,地址:https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_any-value

我们可以把select语句中查询的属性(除聚合函数所需的参数外),全部放入any_value(field)函数中;

例如:select name,any_value(sex) from test_table group by name

这样sql语句不管是在ONLY_FULL_GROUP_BY模式关闭状态还是在开启模式都可以正常执行,不被mysql拒绝。

原文地址:https://www.cnblogs.com/yoyotl/p/11964460.html

时间: 2024-10-09 16:30:35

MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column的相关文章

Error Code: 1055.Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.

环境:mysql-8.0.15-winx64 问题描述: Error querying database. Cause: java.sql.SQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'tt.from_id' which is not functionally dependent on columns in GRO

mysql报错:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre

原因: https://blog.csdn.net/fansili/article/details/78664267 解决办法: 1:查看mysql配置文件位置 [root@localhost ~]# ps -ef | grep mysql mysql 838 1 0 02:21 ? 00:00:00 /usr/sbin/mysqld --defaults-file=/etc/my.cnf root 2035 1706 0 02:29 pts/0 00:00:00 grep --color=au

mysql问题解决SELECT list is not in GROUP BY clause and contains nonaggregated column

今天在Ubuntu下的部署项目,发现一些好好的列表页面发生 1055:Expression #11 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'ppm_c.ppm_flow_starting_dealing.status' which is not functionally dependent on columns in GROUP BY clause; this is incompati

MySQL 报错 1055

具体报错 [2019-02-20 11:57:36] [42000][1055] Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'exer.student.sid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode

SELECT list is not in GROUP BY clause and contains nonaggregated

安装了mysql5.7,用group by 查询时抛出如下异常 SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'kanxf.o.down_uid' which is not functionally dependent on columns in GROU

mysql遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题

报错如下: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sss.month_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by 问题出现的原因: MySQL 5.7.

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre

原文链接:https://blog.csdn.net/hq091117/article/details/79065199 https://blog.csdn.net/allen_tsang/article/details/54892046 MySQL 5.7.5后only_full_group_by成为sql_mode的默认选项之一,这可能导致一些sql语句失效. 比如下表game: id group_id name score 1 A 小刚 20 2 B 小明 19 3 B 小花 17 4 C

windows server 2008 安装MySQL 8.0 遇到报错 1055 - Expression #1 of ORDER BY clause is not in GROUP BY

mysql安装参考教程:https://blog.csdn.net/qq_37350706/article/details/81707862 安装完毕后 执行sql语句 SELECT * FROM court_info GROUP BY second_court_name HAVING COUNT(second_court_name) > 1 报错 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause an

解决mysql报错:- Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ'

mysql执行报错: - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_fu