ARRAY CAT Function

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PostgreSQL ARRAY_CAT() function

ARRAY_CAT() function

This function is used to concatenate two arrays.

Syntax :

array_cat (anyarray, anyarray)

Return Type :

anyarray

PostgreSQL Version : 9.3

Example : PostgreSQL ARRAY_CAT() function

SELECT array_cat(ARRAY[1,2,3], ARRAY[4,5]);

Output :

  array_cat
-------------
 {1,2,3,4,5}
(1 row)