Dofactory.com
Dofactory.com
Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

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



Last updated on Dec 21, 2023

Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.