Back to Starrocks

ascii

docs/en/sql-reference/sql-functions/string-functions/ascii.md

4.1.0411 B
Original Source

ascii

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

Syntax

Haskell
INT ascii(VARCHAR str)

Examples

Plain
MySQL > select ascii('1');
+------------+
| ascii('1') |
+------------+
|         49 |
+------------+

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

keyword

ASCII