In MySQL, the ORD()
function returns the numeric value of the leftmost character of a given string. You provide the string as an argument.
If the leftmost character is a multibyte character, the returned value is calculated from the numeric values of its constituent bytes. If the leftmost character is not a multibyte character, the return value is its ASCII code (which is the same result as when using the ASCII()
function).