How can it be possible to 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: 20-Jun-2020

104 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements