This MariaDB tutorial explains how to use the MariaDB RIGHT function with syntax and examples.
The MariaDB RIGHT function allows you to extract a substring from a string, starting from the right-most character.
The syntax for the RIGHT function in MariaDB is:
RIGHT( string, number_of_characters )
The string that you wish to extract from.
The number of characters that you wish to extract from string starting from the right-most character.
The RIGHT function can be used in the following versions of MariaDB:
Let's look at some MariaDB RIGHT function examples and explore how to use the RIGHT function in MariaDB.
For example:
SELECT RIGHT('AODBA.com', 1);
Output: 'm'
SELECT RIGHT('AODBA.com', 4);
Output: '.com'
SELECT RIGHT('AODBA.com', 6);
Output: 'BA.com'
SELECT RIGHT('AODBA.com', 99);
Output: 'AODBA.com'