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)