数据仓库服务 GAUSSDB(DWS)-数组操作符:||

时间:2024-12-06 15:12:47

||

描述:数组与数组进行连接

示例:

1
2
3
4
5
SELECT ARRAY[1,2,3] || ARRAY[4,5,6] AS RESULT;
    result     
---------------
 {1,2,3,4,5,6}
(1 row)
1
2
3
4
5
SELECT ARRAY[1,2,3] || ARRAY[[4,5,6],[7,8,9]] AS RESULT;
          result           
---------------------------
 {{1,2,3},{4,5,6},{7,8,9}}
(1 row)
support.huaweicloud.com/sqlreference-910-dws/dws_06_0332.html