Skip to main content

Categories: String

REVERSE

Reverses the order of characters in a string.

Syntax​

REVERSE(expression varchar) → varchar​

  • expression: The string to reverse.

Examples

REVERSE example
SELECT REVERSE('Hello, world!');
-- !dlrow ,olleH
Reverse a string with non-ASCII characters
SELECT REVERSE('Drémio!')
-- !oimérD
Reverse a NULL value
SELECT REVERSE(NULL)
-- null