Remove trailing spaces. This function returns the string with any trailing whitespace characters removed.
RTRIM(str)Returns the string str with trailing space characters removed.
Returns NULL if given a NULL argument. If the result is empty, returns either an empty string, or, with , NULL.
The Oracle mode version of the function can be accessed outside of Oracle mode by using RTRIM_ORACLE as the function name.
Oracle mode:
- leading spaces removed
- removes all given prefixes or suffixes
This page is licensed: GPLv2, originally from
SELECT QUOTE(RTRIM('MariaDB '));
+-----------------------------+
| QUOTE(RTRIM('MariaDB ')) |
+-----------------------------+
| 'MariaDB' |
+-----------------------------+SELECT RTRIM(''),RTRIM_ORACLE('');
+-----------+------------------+
| RTRIM('') | RTRIM_ORACLE('') |
+-----------+------------------+
| | NULL |
+-----------+------------------+