Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Updated Dec 20, 2024
Send us feedback
reverse
Applies to: Databricks SQL Databricks Runtime
Returns a reversed string or an array with reverse order of elements.
reverse(expr)
expr: A STRING or ARRAY expression.
expr
STRING
ARRAY
The result type matches the type of expr.
> SELECT reverse('Spark SQL'); LQS krapS > SELECT reverse(array(2, 1, 4, 3)); [3,4,1,2]