Mysql 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate 报错解决方案
2022/7/2 2:20:31
本文主要是介绍Mysql 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate 报错解决方案,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
报错信息:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘xxxx.xxxx.xxx’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by, Time: 0.000000s
在SQL 或 Navicat 中执行 :
set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
备注:需要选择到对应数据库,在执行该sql语句。不然就会出现在这个这个库可以执行,但是其他库不能执行group by 语句。
这篇关于Mysql 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate 报错解决方案的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-10-23BinLog入门:新手必读的MySQL二进制日志指南
- 2024-10-23Binlog入门:MySQL数据库的日志管理指南
- 2024-10-22MySQL数据库入门教程:从安装到基本操作
- 2024-10-22MySQL读写分离入门教程:轻松实现数据库性能提升
- 2024-10-22MySQL分库分表入门教程
- 2024-10-22MySQL慢查询的诊断与优化指南
- 2024-10-22MySQL索引入门教程:快速理解与应用指南
- 2024-10-22MySQL基础入门教程:从安装到基本操作
- 2024-10-22MySQL数据库中的Binlog详解与操作教程
- 2024-10-12部署MySQL集群项目实战:新手入门教程