Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregate

[url]https://www.cnblogs.com/lonelywolfmoutain/p/5433581.html[/url]

[url]https://stackoverflow.com/questions/36228836/syntax-error-or-access-violation-1055-expression-8-of-select-list-is-not-in-gr[/url]

[url]https://stackoverflow.com/questions/37951742/1055-expression-of-select-list-is-not-in-group-by-clause-and-contains-nonaggr[/url]
引用\[1\]、\[2\]和\[3\]都是关于MySQL报错的信息,其中提到了"Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column"的错误。这个错误是由于在使用GROUP BY子句进行分组查询时,SELECT列表中的某些列没有在GROUP BY子句中出现,并且这些列也没有被聚合函数包含,导致不兼容的错误。这个错误通常是由于MySQL的sql_mode设置为only_full_group_by引起的。解决这个错误的方法是要么将SELECT列表中的列添加到GROUP BY子句中,要么将这些列用聚合函数进行处理,以确保查询的正确性。 #### 引用[.reference_title] - *1* *3* [MySQL报错:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ...](https://blog.csdn.net/Saintmm/article/details/124491860)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v4^insert_chatgpt"}} ] [.reference_item] - *2* [Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre](https://blog.csdn.net/weixin_44051060/article/details/105602832)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v4^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值