SQL ASCII(str)函数
ASCII(str)
返回字符串str的最左字符的数值。返回0,如果str为空字符串。返回NULL,如果str为NULL。 ASCII()返回数值是从0到255。
SQL> SELECT ASCII('2'); +---------------------------------------------------------+ | ASCII('2') | +---------------------------------------------------------+ | 50 | +---------------------------------------------------------+ 1 row in set (0.00 sec) SQL> SELECT ASCII('dx'); +---------------------------------------------------------+ | ASCII('dx') | +---------------------------------------------------------+ | 100 | +---------------------------------------------------------+ 1 row in set (0.00 sec)