VeloDB Cloud
SQL Reference
SQL Functions
Scalar Functions
String Functions
ASCII

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 |
+------------+--------------+