The REVERSE function returns a string with its characters arranged in reverse order.
Although less common in everyday reporting, reversing strings can be useful in specialized text-processing tasks.
Reverse a text value for a string-processing requirement.
SELECT
REVERSE(CustomerCode) AS ReversedCode
FROM Customers;
REVERSE can be used in specialized data-cleaning, parsing, pattern-analysis, and text-processing scenarios.
- REVERSE changes the character order.
- The first character becomes the last.
- It is primarily a text-processing function.
- It can be combined with other string functions.
- Availability varies by database.
What does REVERSE do?
REVERSE returns a text value with its characters in reverse order.
Is REVERSE commonly used in basic reporting?
No. It is more useful for specialized text-processing and parsing requirements.