ID EN
String Functions and Operators

RTRIM(str)

MySQL 8.4

Returns the string str with trailing space characters removed.

Syntax

MYSQL
SELECT RTRIM('barbar   ');
'barbar'

Examples

Example

This function is multibyte safe, and returns NULL if str is NULL.

MYSQL
SELECT RTRIM('barbar   ');
'barbar'