totn Oracle Functions

Oracle / PLSQL: NCHR Function

This Oracle tutorial explains how to use the Oracle/PLSQL NCHR function with syntax and examples.

Description

The Oracle/PLSQL NCHR function returns the character based on the number_code in the national character set.

Syntax

The syntax for the NCHR function in Oracle/PLSQL is:

NCHR( number_code )

Parameters or Arguments

number_code
The NUMBER code in the national character set used to retrieve the character.

Returns

The NCHR function returns a string value.

Note

The NCHR( number_code ) is the same as using the CHR function with the USING NCHAR_CS clause as follows:

CHR ( number_code USING NCHAR_CS )

Applies To

The NCHR 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 NCHR function examples and explore how to use the NCHR function in Oracle/PLSQL.

For example:

NCHR(116)
Result: 't'

NCHR(84)
Result: 'T'

View a listing of the ASCII values.