mysql 5.7或以上的新版本sql_mode 默认开启开 only_full_group_by,如果 select 中出现的字段,没有使用聚合函数,或不存在group by中就会提示,this is incompatible with sql_mode=only_full_group_by。
解决方法:
1. 去除sql_mode 中的 only_full_group_by.
2. 如果select 的字段不存group by中,可以用使any_value函数获取,例如 select any_value(id) as id.....
如对本文有疑问, 点击进行留言回复!!
服务器Centos部署MySql并连接Navicat过程详解
网友评论