select stuff((select ','+fieldName + ' as ' + alias from Table where a.No=No for xml path('')),1,1,'') as sqlJoint from Table as a where No='00001'
group by No
SQL将多个字段查询出来拼接成一行
最新推荐文章于 2025-05-28 14:13:39 发布
select stuff((select ','+fieldName + ' as ' + alias from Table where a.No=No for xml path('')),1,1,'') as sqlJoint from Table as a where No='00001'
group by No