REVERSE() FUNCTION
The MySQL REVERSE function is used to reverse the order of the position of the characters in a string. The various versions of MySQL supports the REVERSE function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23.
Syntax:
REVERSE( string )
Parameters:
string: It is used to specify the string to modify.
Example 1:
mysql> SELECT REVERSE ( ‘HELLO WORLD’ ); |
Output:
‘DLROW OLLEH’ |
Explanation:
The specified string is reversed.
Example 2:
mysql> SELECT REVERSE ( 12345 ); |
Output:
‘54321’ |
Explanation:
The specified expression is reversed.
Please Share