Data Loader

REVERSE String Function in MSSQL and MySQL

The REVERSE string function returns a string in reverse order. This function does the same job in both MS SQL Server and MySQL. It has same name and syntax in both these databases

MSSQL

Syntax

REVERSE ( string_expression )  

Example

select REVERSE('ABCDEF');
-----------------
FEDCBA
REVERSE function in MS SQL Server
 

MySQL

In MySQL the same function is also available with same name

Syntax

REVERS( str_to_reverse )

Example

mysql> select REVERSE('ABCDEF');
+-------------------+
| REVERSE('ABCDEF') |
+-------------------+
| FEDCBA |
+-------------------+
1 row in set (0.00 sec)

mysql>
REVERSE function in MySQL
 

Back to Converting Functions from MSSQL to MySQL