w3resource

Oracle NLS_CHARSET_NAME function

Description

The Oracle NLS_CHARSET_NAME is used to return the name of the character set corresponding to ID number number1. When the number is not recognized as a valid character set ID, then this function returns null.

Uses of Oracle NLS_CHARSET_NAME Function
  • Retrieve Character Set Name: Obtain the name of a character set by providing its ID number.

  • Validate Character Set IDs: Check if a given character set ID is valid by verifying if the function returns a non-null value.

  • Database Configuration: Assist in configuring or querying database settings that depend on character set names.

  • Character Set Conversions: Facilitate conversions and operations that require knowing the specific name of a character set based on its ID.

Syntax:

NLS_CHARSET_NAME(number1)

Parameter:

Name Description
number1 A number

Return Value Type

VARCHAR2

Examples: Oracle NLS_CHARSET_NAME function

The following example returns the character set corresponding to character set ID number 1:

SELECT NLS_CHARSET_NAME(1) 
FROM DUAL;

Sample Output:

NLS_CHAR
--------
US7ASCII

Previous: NLS_CHARSET_ID
Next: Oracle JOINS



Follow us on Facebook and Twitter for latest update.