# RIGHT

The RIGHT function returns a substring by extracting a specified number of characters from the end (right side) of a string.

## Syntax

`RIGHT(string, length)`

### Parameters

#### string

The string from which the substring will be extracted.

#### length

The number of characters to return from the right end of the string.

## Examples

Extracts the last three characters from the `last_name` column for each employee.

```esql
FROM employees
| KEEP last_name
| EVAL right = RIGHT(last_name, 3)
```