mysql出现which is not functionally dependent on columns in GROUP BY clause报错
方案一:修改SQL语句,每个字段前加上any_value
SELECT any_value(id) AS id,any_value(uid),any_value(rid) FROM user WHERE (id = '125') GROUP BY uid;
方案二:修改数据库配置
1、查询模式
select @@sql_mode;
2、 修改配置文件my.ini/mysql.ini
# 增加下面一行
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
转自https://blog.csdn.net/chengqiuming/article/details/106034357