Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 2.67 KB

json-functions-transact-sql.md

File metadata and controls

44 lines (38 loc) · 2.67 KB
titledescriptionauthorms.authorms.reviewerms.datems.servicems.subservicems.topichelpviewer_keywordsdev_langsms.custommonikerRange
JSON Functions (Transact-SQL)
Use JSON functions to validate or change JSON text, or to extract simple or complex values.
WilliamDAssafMSFT
wiassaf
jovanpop, randolphwest
08/20/2024
sql
t-sql
reference
JSON functions
TSQL
build-2024
=azuresqldb-current || =azure-sqldw-latest || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric

JSON functions (Transact-SQL)

[!INCLUDE sqlserver2016-asdb-asdbmi-asa-fabricse-fabricdw]

Use the functions described in this article support querying, manipulating, and construction JSON data. Use JSON functions to validate or change JSON documents, or to extract basic or complex values.

FunctionDescription
ISJSONTests whether a string contains valid JSON.
JSON_ARRAYConstructs JSON array text from zero or more expressions.
JSON_ARRAYAGGConstructs a JSON array from an aggregation of SQL data or columns.
JSON_MODIFYUpdates the value of a property in a JSON string and returns the updated JSON string.
JSON_OBJECTConstructs JSON object text from zero or more expressions.
JSON_OBJECTAGGConstructs a JSON object from an aggregation of SQL data or columns.
JSON_PATH_EXISTSTests whether a specified SQL/JSON path exists in the input JSON string.
JSON_QUERYExtracts an object or an array from a JSON string.
JSON_VALUEExtracts a scalar value from a JSON string.
OPENJSONParses JSON text and returns objects and properties from the JSON input as rows and columns.

For more info about the built-in support for JSON in [!INCLUDE ssNoVersion], see JSON data in SQL Server.

Related content

close