mysql错误:Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated colum
Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated colum
原因:
MySQL 5.7.5及以上默认对功能依赖的检测。如果启用了only_full_group_by SQL模式,MySQL就会拒绝选择列表、条件或顺序列表引用的查询,这些查询将引用组中未命名的非聚合列,而不是在功能上依赖于它们。
select @@global.sql_mode
出现:
ONLY_FULL_GROUP_BY,S
原创
2020-06-22 21:10:15 ·
2704 阅读 ·
0 评论