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)