问题出现的原因: 
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. MySQL 优化之EXPLAIN详解(执行计划)

    学习MySQL时我们都知道索引对于一个SQL的优化很重要,而EXPLAIN关键字在分析是否正确以及高效的增加了索引时起到关键性的作用. 这篇文章显示了如何调用“EXPLAIN”来获取关于查询执行计划的 ...

  2. windbg调试托管代码 .Net clr

    现在很多的程序都是多语言混合编程的,比如我司的产品,就是用C++/.net clr混合编制的.那么当我们调试这样的程序时,一定要注意,比如有时我们只看到c++的栈和名称,而.net clr的代码确看不 ...

  3. Vim颜色配置

    最近迷上了Vim 主要原因是可以装逼 不过话说它自带的配色里面也就只有一个evening能勉强满足我的审美 于是我花了大概几天的时间翻了些百度贴吧,或者自己手动改属性后面的配色来实验这个属性到底对应哪 ...

  4. centos host-only网卡配置

    1.更改网卡配置 更改虚拟机/etc/sysconfig/network-scripts/ifcfg-enp0s3 文件,内容如下: TYPE=Ethernet PROXY_METHOD=none B ...

  5. Linux安装配置JDK与卸载

    最近在Linux系统部署门户,安装Oracle,导入dmp,JDK等等,遇到一大堆问题,解决后特有一番小小成就感,哇哈哈!在这里记录一下遇到问题: 官网下载JDK压缩包( .tar.gz ):http ...

  6. (20)打鸡儿教你Vue.js

    vue-cli 快速创建工程,工程化项目目录 npm uninstall -g vue-cli npm install -g @vue/cli https://www.bootcdn.cn/ http ...

  7. PHP查询oracle数据显示乱码问题

    1.Linux下 执行前脚本前先执行一下命令export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8" 2.Windows下在代码里添加 ...

  8. ModuleNotFoundError: No module named 'cv2'

    pip3 install opencv-python

  9. AspNetCore3.0 和 JWT

    添加NuGet引用 IdentityModel Microsoft.AspNetCore.Authorization.JwtBearer 在appsettings.json中添加JwtBearer配置 ...

  10. spaceclaim脚本(内摆线)

    import math #导入数学模块,因为会使用π def x_comp(k,r,t): #定义x坐标的计算函数 return r * (k -1) * math.cos(t) + r * math ...