CHR returns the character specified by the code passed in the 1st argument.

The returned character depends on the underlying code set that Oracle is using for character data.

The argument must be a value that Oracle can implicitly convert to a numeric.

You can optionally pass CHR using nchar_cs with the 1st argument to tell Oracle to use the national code set.

CHR returns a VARCHAR2 data type.


On an ASCII machine using the character set WE8ISO8859P1, the following example will execute correctly.

SELECT CHR(79)||CHR(114)||CHR(97)||CHR(99)||CHR(108)||CHR(101) as DB FROM DUAL;


To use UTF8, you specify using nchar_cs in the argument list:

SELECT CHR(n using nchar_cs) from DUAL;

Chr – Oracle SQL Function
Tagged on: