数据仓库服务 GAUSSDB(DWS)-JSON/JSONB函数:jsonb_build_array( [VARIADIC "any"] )

时间:2024-12-24 10:32:44

jsonb_build_array( [VARIADIC "any"] )

描述:从一个可变参数列表构造一个可能包含异质类型的JSON数组。

返回类型:jsonb

示例:

1
2
3
4
5
SELECT jsonb_build_array('a',1,'b',1.2,'c',true,'d',null,'e',json '{"x": 3, "y": [1,2,3]}','');
                               jsonb_build_array
-------------------------------------------------------------------------------
 ["a", 1, "b", 1.2, "c", true, "d", null, "e", {"x": 3, "y": [1, 2, 3]}, null]
(1 row)
support.huaweicloud.com/sqlreference-dws/dws_06_0356.html
推荐文章