This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.
ARRAY_CONCAT
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The ARRAY_CONCAT
(or ARRAY_CAT
) function allows for concatenating arrays:
SELECT ARRAY[1, 2] || ARRAY[3, 4]
create.select(arrayConcat(array(1, 2), array(3, 4))).fetch();
The result would look like this:
+--------------+ | array_concat | +--------------+ | [1, 2, 3, 4] | +--------------+
Dialect support
This example using jOOQ:
arrayConcat(array(1, 2), array(3, 4))
Translates to the following dialect specific expressions:
-- AURORA_POSTGRES, COCKROACHDB, H2, HSQLDB, POSTGRES, TRINO, YUGABYTEDB (ARRAY[1, 2] || ARRAY[3, 4]) -- ACCESS, ASE, AURORA_MYSQL, BIGQUERY, DB2, DERBY, DUCKDB, EXASOL, FIREBIRD, HANA, INFORMIX, MARIADB, MEMSQL, MYSQL, -- ORACLE, REDSHIFT, SNOWFLAKE, SQLDATAWAREHOUSE, SQLITE, SQLSERVER, SYBASE, TERADATA, VERTICA /* UNSUPPORTED */
(These are currently generated with jOOQ 3.19, see #10141), or translate your own on our website
Feedback
Do you have any feedback about this page? We'd love to hear it!