SQL RTRIM Function

RTRIM removes trailing spaces from an input string.

To remove leading spaces use the LTRIM function.

To remove both leading and trailing spaces use the TRIM function.

Example

#

The example removes the trailing spaces from the input string.

SELECT RTRIM('SQL     ') AS 'Right Trimmed'
Result:  1 record
Right Trimmed
SQL

Syntax

Syntax of the RTRIM function.

RTRIM(string)

string -- a character expression, variable, or column name.


You may also like



Guides


vsn 3.1