MySQL ascll()函数
ASCII(str)
返回字符串str的最左字符的数值。如果str是空字符串返回0。如果str为NULL,返回NULL。ASCII()计算字符的数值范围为0至255。
mysql> SELECT ASCII('2'); +---------------------------------------------------------+ | ASCII('2') | +---------------------------------------------------------+ | 50 | +---------------------------------------------------------+ 1 row in set (0.00 sec) mysql> SELECT ASCII('dx'); +---------------------------------------------------------+ | ASCII('dx') | +---------------------------------------------------------+ | 100 | +---------------------------------------------------------+ 1 row in set (0.00 sec)