Declaration
ASCII(str)
Description
Returns the ASCII code of the leftmost character in the string str.
If str is an empty string, the function returns 0. If str is NULL, the function returns NULL.
Examples
obclient> SELECT ASCII('');
+-----------+
| ASCII('') |
+-----------+
| 0 |
+-----------+
1 row in set
obclient> SELECT ASCII('oceanbase');
+--------------------+
| ASCII('oceanbase') |
+--------------------+
| 111 |
+--------------------+
1 row in set
obclient> SELECT ASCII('Oceanbase');
+--------------------+
| ASCII('Oceanbase') |
+--------------------+
| 79 |
+--------------------+
1 row in set