ARRAY LENGTH Function

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

PostgreSQL ARRAY_LENGTH() function

ARRAY_LENGTH() function

This function is used to return the length of the requested array dimension.

Syntax :

array_length(anyarray, int)

Return Type :

int

PostgreSQL Version : 9.3

Example : PostgreSQL ARRAY_LENGTH() function

SELECT array_length(array[1,2,3], 1);

Output :

  array_length
--------------
            3
(1 row)