ASCII(x) gets the ASCII value of the character x : ASCII « Character String Functions « Oracle PL/SQL Tutorial






CHR() and ASCII() have the opposite effect.

The following example gets the ASCII value of a, A, z, Z, 0, and 9 using ASCII().

SQL> SELECT ASCII('a'), ASCII('A'), ASCII('z'), ASCII('Z') from dual;

ASCII('A') ASCII('A') ASCII('Z') ASCII('Z')
---------- ---------- ---------- ----------
        97         65        122         90

SQL>








11.2.ASCII
11.2.1.ASCII(x) gets the ASCII value of the character x
11.2.2.Ascii gives the ASCII value of the first character of a string
11.2.3.ASCII(0), ASCII(9)
11.2.4.select ascii('a'), ascii('z'),ascii('A'), ascii('Z'),ascii('ABC'), chr(77)
11.2.5.ASCII('A') ASCII('Z') ASCII('A') ASCII('Z') ASCII('ABC')