Return the ASCII value of the first character in "CustomerName":
SELECT ASCII(CustomerName) AS NumCodeOfFirstChar
FROM Customers;
Try it Yourself »
The ASCII() function returns the ASCII value for the specific character.
ASCII(
character)
Parameter | Description |
---|---|
character | Required. The character to return the ASCII value for. If more than one character is entered, it will only return the value for the first character |
Works in: | From MySQL 4.0 |
---|
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!