MySQL REVERSE() Function
Definition and Usage
The REVERSE() function reverses a string and returns the result.
Note: The REVERSE() function is safe to use with multi-bytes.
Syntax
REVERSE(string)
Parameter Values
Parameter | Description |
---|---|
string | Required. The string to reverse |
Technical Details
Works in: | MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23 |
---|
More Examples
Example
Reverse the text in CustomerName:
SELECT REVERSE(CustomerName)
FROM Customers;
Try it Yourself »