VeloDB Cloud
SQL Reference
SQL Functions
Scalar Functions
Array Functions
ARRAY_POPBACK

ARRAY_POPBACK

description

Remove the last element from array.

Syntax

ARRAY_POPBACK(<arr>)

Parameters

ParameterDescription
<arr>ARRAY array

Return Value

Returns the array after removing the last element. Special cases:

  • If the input parameter is NULL, returns NULL.

example

select array_popback(['test', NULL, 'value']);
+-----------------------------------------------------+
| array_popback(ARRAY('test', NULL, 'value'))         |
+-----------------------------------------------------+
| ["test", NULL]                                        |
+-----------------------------------------------------+