数据库报错:SELECT list is not in GROUP BY clause

数据库报错:SELECT list is not in GROUP BY clause

admin
2026-07-05 / 0 评论 / 1 阅读

mysql5.7使用group by出现错误:

[Err] 1055 - Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.score.c_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

phpstudy解决方法:在phpstudy的mysql.ini文件中添加

sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

0

评论 (0)

取消
0:00