w3resource
MySQL Tutorial

PostgreSQL UNNEST() function

UNNEST() function

This function is used to expand an array to a set of rows.

Syntax:

unnest(anyarray)

Return Type:

setof anyelement

PostgreSQL Version: 9.3

Example: PostgreSQL UNNEST() function

Code:

SELECT unnest(ARRAY[1,2]);

Sample Output:

 unnest
--------
      1
      2
(2 rows)


New Content: Composer: Dependency manager for PHP, R Programming