i have this Table
1 a d
1 a e
2 b f
2 b g
3 c h
3 c i
3 c j
3 c k
and i want to this result
1 a d,e
2 b f,g
3 c h,I,j,k,l
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AFAIK, SQL-Server has no built in way to do so, but you can make use of the
FOR XMLto do so:This will give you:
SQL Server fiddle demo
However, MySQL has a built in function,
GROUP_CONCAT():Mysql Fiddle Demo