Skip to main content
Version: Latest-4.0

right

This function returns a specified length of characters from the right side of a given string. Length unit: utf8 character. Note: This function is also named as strright.

Syntax​

VARCHAR right(VARCHAR str,INT len)

Examples​

MySQL > select right("Hello starrocks",9);
+-----------------------------+
| right('Hello starrocks', 9) |
+-----------------------------+
| starrocks |
+-----------------------------+

keyword​

RIGHT

StarRocks Assistant

AI generated answers are based on docs and other sources. Please test answers in non-production environments.