The NLS_CHARSET_ID function returns the ID corresponding to the character set name.
Note
This function is available since OceanBase Database V4.4.2 BP1.
Syntax
NLS_CHARSET_ID(string)
Parameter
The string parameter is a string of any character set.
- If the value of
stringisCHAR_CS, the function returns the ID of the default character set of the current database. - If the value of
stringisNCHAR_CS, the function returns the ID of the national character set of the current database. - If the value of
stringis invalid, the function returnsNULL.
Example
obclient> SELECT NLS_CHARSET_ID('ja16euc')
FROM DUAL;
The execution result is as follows:
+---------------------------+
| NLS_CHARSET_ID('JA16EUC') |
+---------------------------+
| 803 |
+---------------------------+
1 row in set (0.001 sec)
