本文主要是介绍mysql分组时出现Expression #2 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 'wlhy.c.com
mysql分组时出现Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggre
在mysql里面执行命令
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))
设置sql_mode,把ONLY_FULL_GROUP_BY替换成空的。
问题产生的原因:
可能是用docker安装的mysql出现问题,不建议用docker安装mysql数据库
这篇关于mysql分组时出现Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggre的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!