问题出现的原因: 
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参考手册”。)

修改mysql配置文件:

[mysqld] 
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

mysql遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题的更多相关文章

  1. 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 'a.id' ...

  2. 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/artic ...

  3. [mysql] Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'loser.tank_admin.login_ip' which is not functionally dependent on columns in GROUP BY clause; this is

    执行SQL: SELECT login_name,login_ip,sex FROM tank_admin GROUP BY login_name ; 时抛出异常. Expression #2 of ...

  4. 【mybatis】【mysql】mybatis查询mysql,group by分组查询报错:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

    mybatis查询mysql,group by分组查询报错:Expression #1 of SELECT list is not in GROUP BY clause and contains no ...

  5. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'blog.t_blog.addTime' which is not functi

    sql报错: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT ...

  6. 记录一次mysql由5.6升级到5.7出现的异常---Expression #23 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'c.commentCount' which is not functionally dependent on columns in GROUP BY clause;

    ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expre ...

  7. 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 'rpa ...

  8. mysql升级后出现Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.

    安装了mysql5.7,用group by 查询时抛出如下异常: Expression #3 of SELECT list is not in GROUP BY clause and contains ...

  9. MySQL遇见SELECT list is not in GROUP BY clause and contains nonaggre的问题

    目录 报错现象 原因 解决方法 报错现象 执行SQL报错如下: SELECT student.s_no,student.s_name,SUM(result.mark) FROM student,res ...

随机推荐

  1. python - Django - restframework 简单使用 和 组件

    FBV 和 CBV CBV 通过函数调用方法FBV 通过类调用方法    其本质上都是 CBV 但是 FBV 内部封装了关于 method 的方法,由于基本上都是前端的请求,所有像GET,POST等方 ...

  2. 4、MapReduce思想、运行机制

    MapReduce 离线计算框架 分而治之 input > map > shuffle > reduce > output 分布式并行的计算框架 将计算过程分为两个阶段,Map ...

  3. Restful API 指南

    作为软件开发人员,我们大多数人在日常生活中使用或构建 REST api.API 是系统之间的默认通信方式.亚马逊是如何有效地使用 api 进行通信的最佳例子. 在这篇文章中,我将讨论如何更好地设计 R ...

  4. Centos 下 Apache 原生 Hbase + Phoenix 集群安装(转载)

    前置条件 各软件版本:hadoop-2.7.7.hbase-2.1.5 .jdk1.8.0_211.zookeeper-3.4.10.apache-phoenix-5.0.0-HBase-2.0-bi ...

  5. 【洛谷2791】 幼儿园篮球题 第二类斯特林数+NTT

    求 \(\sum_{i=0}^{k}\binom{m}{i}\binom{n-m}{k-i}i^L\) \((1\leqslant n,m\leqslant 2\times 10^7,1\leqsla ...

  6. learning java java.time相关类

    var clock = Clock.systemUTC(); System.out.println(clock.instant()); System.out.println(clock.millis( ...

  7. 使用socket.io实现多房间通信聊天室

    websocket的实现有很多种,像ws和socket.io,这里使用的是socket.io来实现多房间的效果. 这里的使用没有使用socket.io官方提供的namespace和room,而是完全通 ...

  8. 【转】Hive 修改 table、column

    表 1.重命名表重命名表的语句如下: ALTER TABLE table_name RENAME TO new_table_name 2.修改表属性: ALTER TABLE table_name S ...

  9. scala_基础

     笔记前言:本笔记为scala的入门基础和scala基础使用.主要参考为书籍和推荐较高的博客.主要目的为供个人总结学习. 所有来自网络参考内容不一一列出. 一.面向过程 1.变量体 val 标识符:声 ...

  10. 面试题 int(3) int(10) 区别

    1.MySQL 中 int(3) int(10) 区别 答案 存储大小并无差异,只是不足位数的时候,左边补0. ###补充知识点 创建数据库表时,加zerofill ,可以看出效果.mysql 默认 ...