bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL RTRIM() Function

Concept visual

MySQL RTRIM() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Remove trailing spaces from a string:

SELECT RTRIM("SQL Tutorial     ") AS RightTrimmedString;

Definition and Usage

The RTRIM() function removes trailing spaces from a string.

Syntax

Rtrim(

string )

Parameter Values

Parameter

Description string

Required. The string to remove trailing spaces from

Technical Details

Works in:

From MySQL 4.0

Previous

❮ MySQL Functions

Next

Previous

MySQL RPAD() Function

Next

MySQL SPACE() Function