In Oracle, the ASCII function returns the ASCII value for the character supplied as a parameter. The following is the syntax of the Oracle ASCII function:
Oracle ASCII Function Syntax
ascii(single_char_value)
Oracle SQL Query to Find ASCII Value of a Character
Below is an example of Oracle SQL Query to find the ASCII value of a character.
select ascii('A') from dual;
Output:
65
Example - 2:
In the following example, it will return the ASCII value of a character 'a':
select ascii('a') from dual
Output:
97
Leave a comment