Skip to main content
VeloDB Cloud 4.x is based on Doris 3.x. Versions in this section refer to Doris versions. See Version Mapping.

ASCII

Description​

Returns the ASCII code of the first character of a string

Syntax​

ASCII ( <str> )

Parameters​

ParameterDescription
<str>The string whose ASCII code of the first character needs to be calculated

Return value​

Parameter ASCII code of the first character

Example​

SELECT ASCII('1'),ASCII('234')
+------------+--------------+
| ascii('1') | ascii('234') |
+------------+--------------+
| 49 | 50 |
+------------+--------------+