reverse
function
Applies to: Databricks SQL Databricks Runtime
Returns a reversed string or an array with reverse order of elements.
Syntax
reverse(expr)
Arguments
expr
: ASTRING
orARRAY
expression.
Returns
The result type matches the type of expr
.
Examples
> SELECT reverse('Spark SQL');
LQS krapS
> SELECT reverse(array(2, 1, 4, 3));
[3,4,1,2]
Related functions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for