Example
Remove trailing spaces from a string:
SELECT RTRIM('SQL Tutorial ') AS RightTrimmedString;
Definition and Usage
The RTRIM() function removes trailing spaces from a string.
Note: Also look at the LTRIM() function.
Syntax
RTRIM(string)