[Err] 1055 - Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'audit_plan_order.scheduled_end_time' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
是由于默认的 MySQL 配置中 sql_mode 配置了 only_full_group,需要 GROUP BY 中包含所有 在 SELECT 中出现的字段。
only_full_group_by说明:
only_full_group_by :使用这个就是使用和oracle一样的group 规则, select的列都要在group中,或者本身是聚合列(SUM,AVG,MAX,MIN) 才行
本文详细解析了MySQL中因only_full_group_by设置导致的1055错误,阐述了这一配置的作用及如何确保SELECT列表中的所有非聚合列都出现在GROUP BY子句中,以避免该错误。

5467

被折叠的 条评论
为什么被折叠?



