tech on the net

Oracle/PLSQL: CHR Function

Learn how to use the Oracle/PLSQL CHR function with syntax and examples.

Description

The Oracle/PLSQL CHR function is the opposite of the ascii function. It returns the character based on the NUMBER code.

Syntax

The syntax for the Oracle/PLSQL CHR function is:

CHR( number_code )

Parameters or Arguments

number_code is the NUMBER code used to retrieve the character.

Applies To

The CHR function can be used in the following versions of Oracle/PLSQL:

  • Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

Example

Let's look at some Oracle CHR function examples and explore how you would use the CHR function in Oracle/PLSQL.

For example:

CHR(116) would return 't'
CHR(84) would return 'T'

View a listing of the ASCII values.