The RTRIM() function removes the trailing space characters from a string.
Figure 1 shows a visual representation of the RTRIM() function.
RTRIM(string)
The RTRIM() function takes a string as a parameter.
RTRIM() removes the trailing space characters from the string sent as a parameter.
The following example shows how to use RTRIM() to remove trailing spaces from words.
To see the changes, highlight both the “Educative” strings in the output.
SELECT "Educative " as BeforeRtrim;SELECT RTRIM("Educative ") as AfterRtrim;