可能重复:
Building a comma separated list?
Concatenate values based on ID
How to Comma separate multiple rows obtained from a SQL Query
Combing values of a column on multiple rows.?
我有这样的表:
ID Tag
1 abc
1 def
1 ghi
2 acf
2 klv
我想要这个
ID Tag
1 abc, def, ghi
2 acf, klv
如何做到这一点?
感谢。