String-valued functions return NULL, if the the result's length would be greater than the value of the max_allowed_packet system variable.
The first position of a string (for those functions which operate on string), is numbered 1.
Noninteger arguments are rounded to the nearest integer (For functions that take length arguments).
ASCII(str)
ASCII string function returns the numeric value of the leftmost character of the string str. It returns 0 if str is a empty string. It will returns NULL if str is NULL. ASCII() method works for 8-bit characters.
FOR example ASCII value of '3' is 51 and ASCII value of 'al' 97;
mysql> SELECT ASCII('3');
-> 51
mysql> SELECT ASCII('al');
-> 97
0 Comment(s)