> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# right

> Returns a specified number of characters from the right side of a string.

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](/documents/4.2/sql-reference/sql-functions/string-functions/strright.md).

## Syntax

```SQL theme={null}
VARCHAR right(VARCHAR str,INT len)
```

## Examples

```SQL theme={null}
MySQL > select right("Hello starrocks",9);
+-----------------------------+
| right('Hello starrocks', 9) |
+-----------------------------+
| starrocks                   |
+-----------------------------+
```

## keyword

RIGHT


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.