ASCII in SQL

ASCII

This will return the decimal representation in the database character set of the first character of the string.
Syntax: ascii (string)

Ex:

select ascii('a'), ascii('apple') from dual;

output

ascii('a')
-----------
97
ascii('apple')
----------------
97
Ascii in SQL
Ascii in SQL

select ascii('A') from dual; 
------------------------------
65

Leave a Reply