Link Search Menu Expand Document

ARRAY_REVERSE

Returns an array of the same size and type as the original array, with the elements in reverse order.

Syntax

ARRAY_REVERSE(<array>)

Parameters

Parameter Description Supported input types
<array> The array to be reversed ARRAY of any type

Return Type

ARRAY of the same type as the input array

Example

The following example returns the reverse of the input array:

SELECT
	ARRAY_REVERSE([ 1, 2, 3, 6 ]);

Returns: [6,3,2,1]