gpt4 book ai didi

mysql - 如何使用 MySQL Group_concat

转载 作者:行者123 更新时间:2023-11-29 05:50:47 24 4
gpt4 key购买 nike

<分区>

我有下表

| id | a | b | c |
-------------------
| 1 | x | y | r |
| 2 | x | y | q |
| 3 | x | y | f |

结果应该是

| a | b | c |
-------------
| x | y | r,q,f |

尝试过

select a, b, group_concat(c) from table;

但是它说:

Error Code: 1140. In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'table.table'; this is incompatible with sql_mode=only_full_group_by

希望你能帮助我,谢谢!

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com