mysql报1055错误
错误:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘b.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
问题描述:新建的数据库在执行聚合查询时都会有这个错误的,需要设置才行
解决方案:
在数据库控制台输入命令:SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,‘ONLY_FULL_GROUP_BY’,’’));
然后在重新启动Navicat就完美解决了这个问题,有时候可能还要重启下项目。