sql 同一字段合并

select a.* from (select id,Detail,partId=(select cast(partId as char(36))+',' from (select * from table) as b where b.id=a.id for xml path(''))

,code

from table a

group by id,Detail,code) a

posted @   chang1234  阅读(1088)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示