Note
For OceanBase Database V4.4.2, this function is available starting from V4.4.2 BP1.
Purpose
The NLS_CHARSET_ID function returns the character set ID corresponding to a character set name.
Syntax
NLS_CHARSET_ID(string)
Parameters
The string parameter is a string of any character set.
- When
CHAR_CSis passed in: returns the ID of the current database's default character set. - When
NCHAR_CSis passed in: Returns the ID of the current database's national character set. - If the input name is invalid,
NULLis returned.
Examples
obclient> SELECT NLS_CHARSET_ID('ja16euc')
FROM DUAL;
The return result is as follows:
+---------------------------+
| NLS_CHARSET_ID('JA16EUC') |
+---------------------------+
| 803 |
+---------------------------+
1 row in set (0.001 sec)
