摘要: 分组查询连接字段 select [分组字段],stuff((select ',' + [连接字段] from [表] where [分组字段]=a.[分组字段] for xml path('')),1,1,'') as name from [表] a group by [分组字段] 横表根据状态查询 阅读全文
posted @ 2021-08-20 16:24 XSpringSun 阅读(291) 评论(0) 推荐(0) 编辑