RTRIM
rtrimβ
descriptionβ
Syntaxβ
VARCHAR rtrim(VARCHAR str[, VARCHAR rhs])
When the 'rhs' parameter is not present, remove the continuous spaces that appear from the ending of the 'str' parameter. Otherwise, remove 'rhs'.
exampleβ
mysql> SELECT rtrim('ab d ') str;
+------+
| str |
+------+
| ab d |
+------+
mysql> SELECT rtrim('ababccaab','ab') str;
+---------+
| str |
+---------+
| ababcca |
+---------+
keywordsβ
RTRIM