摘要:
select * from tbidvalue1aa1bb2aaa2bbb2cccselect id, [value] = stuff((select ',' + [value] from tb t where id = tb.id for xml path('')) , 1 , 1 , '')from tbgroup by ididvalue1aa,bb2aaa,bbb,ccccreate function f_str(@id int) returns varchar(100)asbegin declare @str varchar(1000) 阅读全文