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

# ascii

> Returns the ASCII code of the leftmost character of a string.

This function returns the ascii value of the leftmost character of a given string.

## Syntax

```Haskell theme={null}
INT ascii(VARCHAR str)
```

## Examples

```Plain Text theme={null}
MySQL > select ascii('1');
+------------+
| ascii('1') |
+------------+
|         49 |
+------------+

MySQL > select ascii('234');
+--------------+
| ascii('234') |
+--------------+
|           50 |
+--------------+
```

## keyword

ASCII


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