w3resource

Oracle NLS_CHARSET_DECL_LEN function

Description

The Oracle NLS_CHARSET_DECL_LEN function is used to returns the declaration length (in a number of characters) of an NCHAR column.

Syntax:

NLS_CHARSET_DECL_LEN(byte_count, 'char_set_id')

Parameter:

Name Description
byte_count The byte_count argument is the width of the column.
char_set_id The char_set_id argument is the character set ID of the column.

Examples: Oracle NLS_CHARSET_DECL_LEN function

The following example returns the number of characters that are in a 200-byte column when you are using a multibyte character set:

SELECT NLS_CHARSET_DECL_LEN(200, nls_charset_id('ja16eucfixed')) 
FROM DUAL;
 

Sample Output:

 NLS_CHARSET_DECL_LEN(200,NLS_CHARSET_ID('JA16EUCFIXED'))
--------------------------------------------------------
                                                     100

Previous: REGEXP_INSTR
Next: NLS_CHARSET_ID



Share this Tutorial / Exercise on : Facebook and Twitter