您的位置:首页 > 数据库 > MySQL

MySQL分组查询时出现错误SELECT list is not in GROUP BY ;this is incompatible with sql_mode=only_full_group_by

2017-07-03 17:08 961 查看
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'chapter04.student.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

解决方法:

修改MySQL的配置文件

vi /etc/mysql/my.cnf

添加语句sql_mode='NO_ENGINE_SUBSTITUTION'

然后重启数据库 /etc/init.d/stop    /etc/init.d/start
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐