在分组是报错__1055

以下的内容摘自:https://blog.csdn.net/antrychme/article/details/81952840

如果还有问题,参考博客:https://blog.csdn.net/rockage/article/details/79522211

首先在分组的时候出现以下的报错ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'myfile.review58.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

然后根据方法输入:

set sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR
_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

ok 完成

老师说这种有原因是因为分组时不知道取谁照成的原因。

原文地址:https://www.cnblogs.com/accolade/p/10620318.html