Select T1.Id , Stuff( ( Select ', ' + T2.Address From MyTable As T2 Where T2.Id = T1.Id Order By T2.Address For Xml Path(''), type ).value('.', 'nvarchar(max)'), 1, 2, '') As AddressFrom MyTable As T1Group By T1.Id
欢迎分享,转载请注明来源:内存溢出
Select T1.Id , Stuff( ( Select ', ' + T2.Address From MyTable As T2 Where T2.Id = T1.Id Order By T2.Address For Xml Path(''), type ).value('.', 'nvarchar(max)'), 1, 2, '') As AddressFrom MyTable As T1Group By T1.Id
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)