📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

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

Was this page helpful?