totn Oracle Functions

Oracle / PLSQL: CHR Function

This Oracle tutorial explains 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 CHR function in Oracle/PLSQL is:

CHR( number_code )

Parameters or Arguments

number_code
The NUMBER code used to retrieve the character.

Returns

The CHR function returns a string value.

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 to use the CHR function in Oracle/PLSQL.

For example:

CHR(116)
Result: 't'

CHR(84)
Result: 'T'

View a listing of the ASCII values.