The REVERSE()
function reverses the order of a string.
Figure 1 shows a visual representation of the REVERSE()
function.
REVERSE(string)
The REVERSE()
function takes a string as a parameter.
REVERSE()
returns the string sent as a parameter in the reverse order.
This function returns
NULL
ifNULL
is sent as a parameter.
-- simple stringSELECT REVERSE('HELLO');-- palindrome stringSELECT REVERSE('LEVEL');-- NULLSELECT REVERSE(NULL);