Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'd.Id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
window系统中,服务中找到mysql服务
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" MySQL80
查看执行路径,找到my.ini文件,在最后尾部增加此行
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
- only_full_group_by functionally incompatible dependent sql_modeonly_full_group_by incompatible sql_mode group group only_full_group_by incompatible sql_mode only_full_group_by functionally incompatible only_full_group_by sql_mode mysql group only_full_group_by sql_mode版本 办法 only_full_group_by aggregated函数sql_mode only_full_group_by sql_mode解决方案 版本 only_full_group_by nonaggregated incompatible sql_mode only_full_group_by