less than 1 minute read

Return results in json

The following works for MS SQL Server:

SELECT *
FROM Table 
where id = 1
FOR JSON AUTO, Without_Array_Wrapper;

Result:

{"id":1,"name":"test"}

Leave a comment