MySQLString FunctionsASCII
FORMAT

ASCIIString Functions

CHAR

Returns the ASCII code of the first character.

Syntax

ASCII(str)

Example

Enter values below to update the example in real time.

grade
grade_code
exam_results
SELECT grade, ASCII(LEFT(grade, 1)) AS grade_code
FROM exam_results;