sqlserver把查询结果转为json和xml

SELECT [type],[desc] FROM #type
FOR JSON PATH
GO
SELECT [type],[desc] FROM #type
WHERE [type] LIKE '%F%'
FOR JSON PATH,ROOT('DB Type') 
GO
select userName,age from UserInfoes where userId=8 for xml path('user') 

 

posted on 2021-11-26 10:53  静以修身俭以养德  阅读(396)  评论(0编辑  收藏  举报

导航