原 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column '
版权声明:本文为博主原创文章,请尊重他人的劳动成果,转载请附上原文出处链接和本声明。
本文链接:https://www.91mszl.com/zhangwuji/article/details/1297
### Cause: java.sql.SQLSyntaxErrorException: Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'mszl_new.m.menu_sort' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
select version(), @@sql_mode;
我们在mysql-server.cnf文件的末尾添加
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
service mysqld restart
2021-01-02 09:18:58 阅读(2068)
名师出品,必属精品 https://www.91mszl.com
博主信息