求助sqlsever for xml path 方法
1个回答
展开全部
一、FOR XML PATH 基本运用
[sql] view plain copy
select teacher,object from teach
利用for xml path后:
[sql] view plain copy
select teacher,object from teach for xml path
二、改变XML行节点的名称
a、根节点默认是<row></row>,我们可以通过path后面的参数改变根节点名称:
[html] view plain copy
select teacher,object from teach for xml path('记录'
[sql] view plain copy
select teacher,object from teach
利用for xml path后:
[sql] view plain copy
select teacher,object from teach for xml path
二、改变XML行节点的名称
a、根节点默认是<row></row>,我们可以通过path后面的参数改变根节点名称:
[html] view plain copy
select teacher,object from teach for xml path('记录'
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询