SQL将一列多行数据转换为一行

xiaoxiao2021-02-28  71

select stuff((select ','+A.CarType from (select distinct CarType from #tempCarType) A FOR xml PATH('')), 1, 1, '') as CarType #tempCarType为表名,CarType为字段名
转载请注明原文地址: https://www.6miu.com/read-70863.html

最新回复(0)