首页 / MYSQL / MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1000字,纯文字阅读大概需要2分钟。
内容图文
![MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column](/upload/InfoBanner/zyjiaocheng/516/fba921054d20489b9be113ab97e5186a.jpg)
1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
‘rpacloudsit.t.app_id‘ which is not functionally dependent on columns in GROUP BY clause;
this is incompatible with sql_mode=only_full_group_by
MySQL有any_value(field)函数,他主要的作用就是抑制ONLY_FULL_GROUP_BY值被拒绝
官方有介绍,地址:https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_any-value
我们可以把select语句中查询的属性(除聚合函数所需的参数外),全部放入any_value(field)函数中;
例如:select name,any_value(sex) from test_table group by name
这样sql语句不管是在ONLY_FULL_GROUP_BY模式关闭状态还是在开启模式都可以正常执行,不被mysql拒绝。
MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
标签:dep pat field pac mys use end and 函数
本文系统来源:https://www.cnblogs.com/yoyotl/p/11964460.html
内容总结
以上是互联网集市为您收集整理的MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column全部内容,希望文章能够帮你解决MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。