Skip to main content
Version: V1.4.1

REVERSE

Declaration​

REVERSE(str)

Description​

Returns the reverse of the string str.

This function is multibyte-safe.

Example​

SELECT REVERSE('oceanbase');
+----------------------+
| REVERSE('oceanbase') |
+----------------------+
| esabnaeco |
+----------------------+
1 row in set (0.001 sec)

SELECT REVERSE(1000);
+---------------+
| REVERSE(1000) |
+---------------+
| 0001 |
+---------------+
1 row in set (0.001 sec)