Skip to content

RTRIM

  • string: This parameter refers to the string of characters from which you want to remove extra whitespace on the right end.
SELECT RTRIM('SQL ');
'SQL'

The RTRIM function in SQL is used to remove all the trailing whitespaces at the right-hand side of a given string. In the mentioned example, the function RTRIM has been applied to the string ‘SQL ’, which removes all the trailing spaces resulting in the output: ‘SQL’.