“Group concat”的版本间的差异
跳到导航
跳到搜索
Jihongchang(讨论 | 贡献) |
Jihongchang(讨论 | 贡献) 小 |
||
第4行: | 第4行: | ||
group by student_id | group by student_id | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | {| | + | {| class="wikitable" |
!student_id | !student_id | ||
!group_concat(course_id) | !group_concat(course_id) |
2024年7月10日 (三) 02:10的最新版本
select student_id, group_concat(course_id)
from score
group by student_id
student_id | group_concat(course_id) |
---|---|
1 | 1 |
2 | 1,2 |
3 | 1,2,3 |
4 | 1,2,3,3 |
5 | 1,1 |
6 | 2,3 |