美文网首页
Mysql5.7版本(group by)相关only_full_

Mysql5.7版本(group by)相关only_full_

作者: 大树下的木房子 | 来源:发表于2018-12-25 15:20 被阅读0次

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'orgGc.gradeName' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

查询官方相关资料,发现“only_full_group_by”SQL_MODE是默认开启的。关于它的详细介绍移步官网,看下详细的说明吧。具体地址如下:
官方参考资料:
http://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html //group by
http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html // sql_mode

解决方法:
对于select中获取非group by的信息,则要通过any_value()函数

相关文章

网友评论

      本文标题:Mysql5.7版本(group by)相关only_full_

      本文链接:https://www.haomeiwen.com/subject/lwyflqtx.html