记一次mysql升级成8.0后group by报错问题
作者:互联网
mysql版本是8.0.012
升级后发现写个简单的group by语句都报错
sql:select * from table名 group by sex;
报错信息:
of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘fenxiangniu.stu.stuno’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
查了很多资料,命令行改不好改,不如直接修改配置文件。就是mysql安装目录下的my.ini文件(windos下)。在[mysqld]下加上如下语句
加上的内容为:
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
标签:8.0,group,升级成,NO,sql,ZERO,报错,mysql 来源: https://blog.csdn.net/qq_41935885/article/details/102757022