Outdated Version

You are viewing an older version of this section. View current production version.

ASCII

Returns the ASCII value of the leftmost character of the given string.

Syntax

ASCII (str)

Arguments

  • str: any string or binary object
Info

ASCII only works with 8-bit characters.

Return Type

Integer, or NULL if str is NULL.

Examples

memsql> select ascii('abracadabra');
+----------------------+
| ascii('abracadabra') |
+----------------------+
|                   97 |
+----------------------+