Sql 简明教程

SQL - JSON Functions

JSON(JavaScript 对象表示法)是一种用于交换数据的简单格式。它具有自描述性,可以用任何语言理解,并且与语言无关。它可用作 XML 代替方案。JSON 当前是一种流行的数据传输标准。

JSON (JavaScript Object Notation) is a simple format for exchanging data. It is self-descriptive, understandable in any language, and irrespective of language. It serves as an XML substitute. JSON is currently a popular data transfer standard.

现代服务返回的数据是 JSON 文本。SQL Server JSON 是数据开发人员返回 SQL 中 JSON 所需的。SQL Server 中的内置 JSON 支持不同于本机 JSON 类型。

The data that returned by modern services is JSON text. SQL Server JSON is the need for data developers to return JSON in SQL. The built-in JSON support in the SQL server is distinct from the native JSON type.

List of Functions

下面列出了返回 SQL Server 中游标信息的标量函数 -

Following is a list of scalar functions that returns information about cursors in the SQL server −

Sr.No.

Function & Description

1

ISJSONIs used check a string’s validity for JSON (JavaScript Object Notation) syntax.

2

JSON_OBJECTIs used create JSON objects from the results of evaluating the SQL expressions of the arguments.

3

JSON_ARRAYIt accepts an expression or a comma-separated list of expressions and returns a JSON array containing those values.

4

JSON_VALUEIt accepts a JSON string and returns a scalar value.

5

JSON_QUERYIs used to extract data from a JSON object.

6

JSON_MODIFYIs used to change JSON data kept in a column of a SQL Server table.

7

JSON_PATH_EXISTSIs used to determine whether a particular JSON route is present within a JSON string.