問(wèn)題:一個(gè)表test,有2列:firstname varchar(50),domain varchar(50)。
test表有如下數(shù)據(jù)行:
firstname????? domain
----------------------
tony????????????? group1
tony????????????? group2
tony????????????? group3
john??????????????group4
?
提問(wèn):求一條sql,查詢(xún)結(jié)果可以按如下格式顯示:
firstname???????????? domain
---------------------------
tony????????????????? group1,group2,group3
john??????????????????group4
?
謝謝
請(qǐng)教sql高手:通過(guò)一條sql語(yǔ)句,可以使查詢(xún)結(jié)果按指定格式顯示的問(wèn)題
千萬(wàn)里不及你
2018-12-06 21:53:42