RTRIM (TSQL Function)

Returns the string expression, with trailing blanks removed.

Syntax

RTRIM  ( string_expression )

Arguments

string_expression
is a string expression of type varchar.

Return Types

Returns varchar.

Examples

PRINT '#' + RTRIM('    Hello    ') + '#';

The result is:

#    Hello#