#1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this is incompatible with sql_mode=only_full_group_by(#1055 - SELECT 列表的表达式不在 GROUP BY 子句中,并且包含与 sql_mode=only_full_group_by 不兼容的非聚合列) - IT屋-程序员软件开发技术分享社
问题描述
我的查询:
select libelle,credit_initial,disponible_v,sum(montant) as montant
FROM fiche,annee,type where type.id_type=annee.id_type and annee.id_annee=fiche.id_annee
and annee = year(current_timestamp) GROUP BY libelle order by libelle asc
- Mysql 5.7.9 运行查询没有任何问题,但 mysql 5.7.12显示上面的错误你能帮我吗
sudo vim/etc/mysql/conf.d/mysql.cnf滚动到文件底部复制粘贴
sudo vim /etc/mysql/conf.d/mysql.cnfScroll to the bottom of file Copy and paste
- 保存并退出输入模式
sudo service mysql restart重启 MySQL.- save and exit input mode
sudo service mysql restartto restart MySQL.
推荐答案
我很难让它工作我已经测试过它并且它在灯服务器 mysql 版本 5.12 上工作
I had a struggle getting this to work i've tested it and it's working on lamp server mysql version 5.12
那么,成功的步骤:
<代码>[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
到文件底部
完成!
这篇关于#1055 - SELECT 列表的表达式不在 GROUP BY 子句中,并且包含与 sql_mode=only_full_group_by 不兼容的非聚合列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:#1055 - SELECT 列表的表达式不在 GROUP BY 子句中,并且包含与 sql_mode=only_full_group_by 不兼容的非聚合列
基础教程推荐
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 在多列上分布任意行 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- oracle区分大小写的原因? 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
