Purpose
CHR() returns a character based on a numeric argument. The return value is associated with the character set of the current system.
Syntax
CHR(n)
Parameters
n is the NUMBER code used to retrieve the corresponding character. It is an integer in the range of [0, 4294967295].
Return type
The return value is associated with the character set of the system. OceanBase Database supports the following character sets: binary, utf8mb4, gbk, utf16, and gb18030.
Examples
The following example converts the decimal number 25700 to the corresponding character in the UTF-8 character set.
obclient> SELECT CHR(25700) AS str FROM DUAL;
+------+
| STR |
+------+
| dd |
+------+
1 row in set