Invert a String in MySQL



MySQL REVERSE() function make it possible to invert a string. Its syntax is as follows −

Syntax

REVERSE(STR)

Here, STR is a string which we want to invert.

Example

mysql> Select REVERSE('MySQL');
+------------------+
| REVERSE('MySQL') |
+------------------+
| LQSyM            |
+------------------+
1 row in set (0.05 sec)
Updated on: 2020-06-20T10:52:21+05:30

191 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements