用示例简要解释表变量 [英] explain table variable in briefly with examples

查看:115
本文介绍了用示例简要解释表变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简要解释表变量的例子

推荐答案

SELECT  distinct Profile,stuff((select distinct ', '  +  Specialization  FROM TM_Specialization tms INNER JOIN TM_Profile tmp
ON tms.ProfileID=tmp.ProfileID where tms.ProfileID =tm_p.ProfileID
FOR XML PATH('')
) ,1,1,'') as Specialization
FROM TM_Profile TM_P INNER JOIN  TM_Specialization TM_s
ON TM_S.ProfileID=TM_P.ProfileID


这篇关于用示例简要解释表变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆