Select * 开发者_高级运维from table1
col1 col2
AAAA CE
BBB MK
All OUT
All IN
KKK BA
CCC NA
KKK IN
I need output as below:
AAAA : CE
BBB : MK
All : OUT,IN
KKK : BA, IN
CCC : NA
If this is MySQL, you can use GROUP_CONCAT function
精彩评论