ID EN
String Functions and Operators

RIGHT(str,len)

MySQL 8.4

Returns the rightmost len characters from the string str, or NULL if any argument is NULL.

Syntax

MYSQL
SELECT RIGHT('foobarbar', 4);
'rbar'

Examples

Example

This function is multibyte safe.

MYSQL
SELECT RIGHT('foobarbar', 4);
'rbar'