rtrim

Returns "string_exp1", with final characters removed after the last character not in "string_exp2", e.g., rtrim('ABxXxyx', 'xy') returns 'ABxX'. If "string_exp2" is not specified, the final space characters are removed.

Syntax

rtrim ( string_exp1 [ , string_exp2 ] )