sql分組合並

select * from dbo.[User]xml

select sqr,stuff((select ','+rtrim(xdr)
from dbo.[User]
where sqr=a.sqr for xml path('')
),1,1,'') as [xdrs]
from (select distinct sqr from dbo.[User]) ablog

 

相關文章
相關標籤/搜索