Mariadb Rtrim Function

MariaDB: RTRIM Function

This MariaDB tutorial explains how to use the MariaDB RTRIM function with syntax and examples.

Description

The MariaDB RTRIM function removes all space characters from the right-hand side of a string.

Syntax

The syntax for the RTRIM function in MariaDB is:

RTRIM( string )

Parameters or Arguments

string

The string to trim the space characters from the right-hand side.

Applies To

The RTRIM function can be used in the following versions of MariaDB:

  • MariaDB 10

Example

Let's look at some MariaDB RTRIM function examples and explore how to use the RTRIM function in MariaDB.

For example:

SELECT RTRIM('AODBA.com    ');
Output: 'AODBA.com'

SELECT RTRIM('AODBA.com knows MariaDB!    ');
Output: 'AODBA.com knows MariaDB!'