Provide the ASCII value of the initial character in “CustomerName”.
SELECT ASCII(CustomerName) AS NumCodeOfFirstChar FROM Customers; |
The ASCII() function retrieves the ASCII value corresponding to a particular character.
ASCII(character) |
Parameter |
Description |
character |
Mandatory. Specifies the character for which to retrieve the ASCII value. If multiple characters are provided, only the value for the first character will be returned. |
Works in: | From MySQL 4.0 |