FOR JSON path returns less number of Rows on AZURE SQL

前端 未结 5 641
余生分开走
余生分开走 2020-12-11 19:57

I am using AZURE SQL (SQL Server 2016) and creating a query to give me output in JSON object. I am adding FOR JSON PATH at the end of query.

When I exe

5条回答
  •  再見小時候
    2020-12-11 20:39

    With thanks to @David Browne. I found I had to use 'print' instead of 'select'

    declare @json varchar(max) = (SELECT * FROM dbo.AppSettings FOR JSON AUTO)
    
    print @json
    

提交回复
热议问题