Skip to main content

ASCII

Returns the numeric value of the leftmost character of the string str.

Syntax

ASCII(<expr>)

Arguments

ArgumentsDescription
<expr>The string.

Return Type

TINYINT

Examples

SELECT ASCII('2');
+------------+
| ASCII('2') |
+------------+
| 50 |
+------------+
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today