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 sys_user_role WHERE (rid = '1259293401992036353') GROUP BY uid;
方案二:修改数据库配置
1、查询模式
select @@sql_mode;
2、 修改配置文件D:\mysql\mysql-5.7.22-winx64my.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
阅读(1032) | 评论(0) | 转发(0) |