this is incompatible with sql_mode=only_full_group_by问题解决方案
今天帮题主测试sql的时候遇到这样一个问题,
大致上是讲,我在聚合中未使用全部查询字段。百度之后才知道,mysql在5.7版本增加了聚合分组校验。
可通过select@@global.sql_mode查看是否开启
如图就表示默认开启了,所以才导致刚才的问题。
关闭方法:
1. 使用set @@global.sql_mode='刚才查询去除ONLY_FULL_GROUP_BY之后的内容'
执行之后,结果是变掉了,可是查询还是之前的问题(我是win10),其他环境未测试
2.第二种方法,修改mysql配置文件my.ini,在[mysqld]下面任意行,增加sql_mode='刚才查询去除ONLY_FULL_GROUP_BY之后的内容',然后重启mysql服务即可
修改后结果:
查询就正常了
this is incompatible with sql_mode=only_full_group_by问题解决方案相关推荐
- MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案
项目场景: 有时候,遇到数据库重复数据,需要将数据进行分组,并取出其中一条来展示,这时就需要用到group by语句. 但是,如果mysql是高版本,当执行group by时,select的字段不属于 ...
- 错误:this is incompatible with sql_mode=only_full_group_by
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'H5APP_WORK ...
- incompatible with sql_mode=only_full_group_by
使用mysql 5.7.11-debug Homebrew时报错 错误信息如下: 26 Mar 2016 09:35:23,432 ERROR org.hibernate.engine.jdbc.sp ...
- mysql命令gruop by报错this is incompatible with sql_mode=only_full_group_by
在mysql 工具 搜索或者插入数据时报下面错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause ...
- mysql查询报错: ORDER BY clause is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by
前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. 我的情况 : Mysql 5.7.21 版本运行sql 报错如题,同样的 sql 直接本地运行不报错 ...
- mysql5.7 gruop by报错this is incompatible with sql_mode=only_full_group_by
解析:在mysql 工具 搜索或者插入数据时报下面错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY cla ...
- MySQL报错this is incompatible with sql_mode=only_full_group_by
1.报错信息 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP ...
- columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by 版本mysql8.0
问题如下: ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause and contains nonagg ...
- mysql升级到5.7版本后,运行程序报错this is incompatible with sql_mode=only_full_group_by
升级mysql后,运行程序报错 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains ...
最新文章
- ArcEngine开发中“错误类型****未定义构造函数”
- C# 代理应用 - Cachable
- 【MFC】类的层次结构图
- .net core linux 编译,.NET Core 源码编译的问题解析
- 这群程序员疯了!他们想成为IT界最会带货的男人
- php日志数据统计,awk 进行php日志累计报错统计
- 使用ActionScript实现滤镜效果
- 【英语学习】【Daily English】U01 Greetings / L01 Same old, same old
- 文章点赞以及取消点赞功能
- windows日志 重要事件 id_操作系统日志简述
- 关机时长时间停留在”正在保存设置“的解决办法
- 6.2-3 局部性+内存层次
- ImportError: No module named 'requests.packages.urllib3'
- 2019年全国/全球马拉松比赛日程
- krpano默认皮肤详解
- 九度[1029]-魔咒词典
- Codewars笔记
- 度小满启动“小微加油站”,让低息服务可持续
- 10款热门的企业报表工具软件,该如何选择?
- 【操作系统】第二章--进程的描述与控制--笔记与理解(2)