Getting started
User guides
Administration guides
Reference guides
Resources
Updated Aug 04, 2022
Send us feedback
shuffle
Returns a random permutation of the array in expr.
expr
shuffle(expr)
expr: An ARRAY expression.
The result type matches the type expr.
This function is non-deterministic.
> SELECT shuffle(array(1, 20, 3, 5)); [3,1,5,20] > SELECT shuffle(array(1, 20, NULL, 3)); [20,NULL,3,1]
array_sort function
sort_array function