ASCII – Convert character to ASCII code – Character Functions

You can use ASCII function to convert character to ASCII code.
It is easy to use ASCII function. Please look at my example below.

example: convert each character to ASCII code.

SELECT alphabet, ASCII(alphabet) FROM tbTestTable;

alphabet    ASCII(alphabet)
----------------------------
a               97
b               98
c               99
x               120
y               121
z               122
A               65
B               66
C               67
X               88
Y               89
Z               90

Posted in Character Functions