Returns the specified string with characters listed in reverse order.
reverse(expression | uchar_expr)
is a character or binary-type column name, variable, or constant expression of char, varchar, nchar, nvarchar, binary, or varbinary type.
is a character or binary-type column name, variable, or constant expression of unichar or univarchar type.
select reverse("abcd")
---- dcba
select reverse(0x12345000)
---------- 0x00503412
reverse, a string function, returns the reverse of expression.
If expression is NULL, returns NULL.
Surrogate pairs are treated as indivisible and are not reversed.
For general information about string functions, see “String functions”.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute reverse.