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
Low-cost, fast analytics, easy data ingestion, and elastic scaling.
Try it today