Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

json with root element in sql server

SELECT BusinessEntityID As Id,  
       FirstName, LastName,  
       Title As 'Info.Title',  
       MiddleName As 'Info.MiddleName'  
   FROM Person  
   FOR JSON PATH, ROOT('info'),INCLUDE_NULL_VALUES
 
PREVIOUS NEXT
Tagged: #json #root #element #sql #server
ADD COMMENT
Topic
Name
6+6 =