天道不一定酬所有勤
但是,天道只酬勤

idea报错“未知错误”:which is not functionally dependent on columns in GROUP BY clause解决方案

columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by mysql8.0解决办法
控制台报错如下:
ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘jol.solution.nick’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

原因:

		mysql5.7以上默认开启了only_full_group_by选项。我的版本是mysql8.0以上的

解决:

sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

未经允许不得转载:java技术小栈 » idea报错“未知错误”:which is not functionally dependent on columns in GROUP BY clause解决方案
分享到

评论 抢沙发