Jump to: navigation, search

Mysql REVERSE

From w3cyberlearnings

Contents

MySQL REVERSE Function

This function returns a given string in reverse order.

Syntax REVERSE

  • Str: String input
REVERSE(Str);

Example 1

mysql> SELECT REVERSE('abc');
+----------------+
| REVERSE('abc') |
+----------------+
| cba            |
+----------------+
1 row in set (0.00 sec)

Example 2

mysql> SELECT REVERSE('remmargorp yzarc a era uoy'); 
+---------------------------------------+
| REVERSE('remmargorp yzarc a era uoy') |
+---------------------------------------+
| you are a crazy programmer            |
+---------------------------------------+
1 row in set (0.00 sec)

Related Links


Navigation
Web
SQL
MISC
References