ASCII returns the decimal representation of the character supplied in the 1st argument.

If your database is set to ASCII, then this will be the ASCII code for the character.

If your database is set to EBCDIC then it will be the EBCDIC code.

The argument can be a CHAR, VARCHAR2, NCHAR or NVARCHAR2 datatype.

Example:

SELECT ASCII(‘Z’) from dual;

ASCII(‘Z’)
—————-
90

Ascii – Oracle SQL Function
Tagged on: