ARRAY_CONCAT (Azure Cosmos DB)ARRAY_CONCAT (Azure Cosmos DB)

适用于: SQL API

返回一个数组,该数组是连接两个或更多数组值的结果。Returns an array that is the result of concatenating two or more array values.

语法Syntax

ARRAY_CONCAT (<arr_expr1>, <arr_expr2> [, <arr_exprN>])  

参数Arguments

arr_exprarr_expr
是要连接到其他值的数组表达式。Is an array expression to concatenate to the other values. ARRAY_CONCAT 函数需要至少两个 arr_expr 参数。The ARRAY_CONCAT function requires at least two arr_expr arguments.

返回类型Return types

返回一个数组表达式。Returns an array expression.

示例Examples

以下示例演示了如何连接两个数组。The following example how to concatenate two arrays.

SELECT ARRAY_CONCAT(["apples", "strawberries"], ["bananas"]) AS arrayConcat 

下面是结果集。Here is the result set.

[{"arrayConcat": ["apples", "strawberries", "bananas"]}]  

备注Remarks

此系统函数不会使用索引。This system function will not utilize the index.

后续步骤Next steps