Latest Post

Tuesday, 25 July 2017

JSON support in Sql Server 2016

JSON support in Sql Server 2016

JSON functions in SQL Server provide you to analyse and query JSON data, transform JSON to relational format, and export SQL query results as JSON text

JSON is stand for JavaScript Object Notation. Its implementation in Sql server is on the similar as that of XML. JSON doesn’t have any native JSON data type in Sql server. You can store JSON data in NVARCHAR or VARCHAR columns.

Following are the most impressive and effective JSON features introduced in Sql Server 2016.

  • FORJSON Clause: we can be used, If we want our query result (rows) as JSON result. It converts the query result to JSON format.
  • OPENJSON Function: It is a table valued function, that is used to transform the JSON value to one or many gives a rowset view of the JSON. It is just like the OPENXML function
  • JSON_VALUEFunction: It returns the scalar value from the input JSON string by passing the location of the scalar value
  • JSON_MODIFYFunction: It update the value of the property in a JSON string and returns the updated JSON string.
  • ISJSONFunction: It is a validation function that check string is formed JSON or not.
  • JSON_QUERYFunction: It gives JSON fragment from the input JSON string from the specified JSON path.
  • IndexingStrategy for JSON Value in Sql Server 2016
  • lax and strict JSON Path modes in Sql Server 2016

Government Jobs