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

时间:2024-10-21 16:50:41

||

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

示例:

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-830-dws/dws_06_0332.html