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

# ascii

> 返回字符串第一个字符对应的 ASCII 码。

返回字符串第一个字符对应的 ASCII 码。

## 语法

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

## 参数说明

`str`: 支持的数据类型为 VARCHAR。

## 返回值说明

返回值的数据类型为 INT。

## 示例

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

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


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