mysql出现GROUP BY clause错误解决办法
Posted 新美好时代
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql出现GROUP BY clause错误解决办法相关的知识,希望对你有一定的参考价值。
#1)当mysql数据库出现如下错误:
#which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
#2)解决办法
#修改sql_mode
#查看sql_mode
select @@sql_mode,@@global.sql_mode;
#去掉ONLY_FULL_GROUP_BY
set @@global.sql_mode =‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION‘;
set @@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出现GROUP BY clause错误解决办法的主要内容,如果未能解决你的问题,请参考以下文章
MySQL_group by报错 [ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause]
mysql错误:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggr
mysql遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题
mysql报错Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate
mysql报错Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column问题(示例
mysql报错Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column问题(示例