ASCII()

Overview

Returns the numeric ASCII value of the leftmost character of the given argument.

USAGE

ASCII(string)

Argument Name

Description

string

The character to evaluate

DETAILS

ASCII() is a string function that returns the numeric ASCII value of the leftmost character of the given string argument.

The American Standard Code for Information Interchange (ASCII) is a character encoding standard for electronic communication.

A 0 is returned if the argument is an empty string (without any whitespace).

A NULL is returned if the argument is NULL.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

-- Note that .05 evaluates the "0" in 0.05
SELECT ASCII(.05), ASCII('1');
+------------+------------+
| ASCII(.05) | ASCII('1') |
+------------+------------+
|         48 |         49 |
+------------+------------+
SELECT ASCII('Foo'), ASCII('f');
+--------------+------------+
| ASCII('Foo') | ASCII('f') |
+--------------+------------+
|           70 |        102 |
+--------------+------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES