mysql遇见contains nonaggregated column 'information_schema.PROFILING.SEQ'异常

报错如下:
[Err] 1055 - 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_full_group_by

问题出现的原因:
MySQL 5.7.5及以上功能依赖检测功能。如果启用了ONLY_FULL_GROUP_BY SQL模式(默认情况下),MySQL将拒绝选择列表,HAVING条件或ORDER BY列表的查询引用在GROUP BY子句中既未命名的非集合列,也不在功能上依赖于它们。(5.7.5之前,MySQL没有检测到功能依赖关系,默认情况下不启用ONLY_FULL_GROUP_BY。有关5.7.5之前的行为的说明,请参见“MySQL 5.6参考手册”。)

解决方案:
select @@global.sql_mode
SET sql_mode=(SELECT REPLACE(@@sql_mode,‘ONLY_FULL_GROUP_BY‘,‘‘)); ##当前session变量生效

SET global sql_mode=(SELECT REPLACE(@@sql_mode,‘ONLY_FULL_GROUP_BY‘,‘‘)); ##全局变量生效

mysql遇见contains nonaggregated column 'information_schema.PROFILING.SEQ'异常

原文地址:https://www.cnblogs.com/linjiqin/p/8890966.html

时间: 2024-11-01 21:48:12

mysql遇见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'

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

mysql查询出现In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'zhibo.a.id';

出现问题: Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP BY,expression #2 of SELECT list contains nonaggregated column 'pay.t.type'; this is incompatible with sql_mode=only_fu

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_

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

information_schema.profiling学习

information_schema.profiling可以用来分析每一条SQL在它执行的各个阶段的用时,注意这个表是session 级的,也就是说如果session1 开启了它:session2没有开启 这个情况下session2 去查询只会返回一个空表 1.set @@ssesion.profiling=1 可以开启information_schema.profiling相关监测 2.information_schema.profiling 表的常用列 1.query_id :查询id 用于

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.

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

com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'goodsName' cannot be null

com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'goodsName' cannot be null 出现这错误,是我封装页面的时候出现的错误. private void addGoods(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // 1.

MySQL 1054错误 Unknown column .... in 'on clause'

ERROR 1054 (42S22): Unknown column ... in 'on clause' 原因: MySQL5.0 Bug, 要把联合的表用括号包含起来才行: 例: Sql代码   SELECT (c.id, a.id, b.id) FROM A a, B b LEFT JOIN C c ON c.a_id = a.a_id AND c.b_id = b.b_id 这句话执行应该是没有错误的,但是Mysql 5 下执行则会出错. 因为mysql下有这样一个BUG,要把联合的表用