In Oracle, the
CHR function returns the character that has the value equivalent to x in the database character set.
ASCII are opposite functions.
CHR returns the character given the character number and
ASCII returns the character number given the character.
You can use this function in PL/SQL procedures and SQL statements. Below are some examples of
select chr(97) a, chr(98) b, chr(99) c from dual;
Get the next alphabet character for the given character. In the below example, I will pass the character 'd', and it will return the next alphabet character 'e':
select chr(ascii('d')+1) next_alphabet from dual;
- How to Get ASCII Value in Oracle?
- VB Chr Function
- How do I get the first letter in uppercase in Oracle SQL?