mysql GROUP_CONCAT 函数 将相同的键的多个单元格合并到一个单元格
MemberID MemberName FruitName
-------------- --------------------- --------------
1 Al Apple
1 Al Cherry
Desired output
MemberID MemberName FruitName
----------- -------------- ------------
1 Al Apple, Cherry
3down voteaccepted |
GROUP BY MemberName and GROUP_CONCAT(FruitName). For example,
|
时间: 2024-10-11 04:05:57