Important
Self-managed SingleStore will soon transition from version 9.1 RC to version 10. This new semantic versioning scheme will provide SingleStore with finer control over engine and feature releases that were not possible with the current versioning scheme.
In the interim, SingleStore 9.1 RC can be used to preview, evaluate, and provide feedback on the new and upcoming features in SingleStore 10 prior to its general availability. Ahead of this transition, SingleStore 9.0 is recommended for production workloads, which can later be upgraded to SingleStore 10.
CHAR
On this page
The CHAR() function processes each argument N as an integer and then returns a string consisting of the characters representing the code values of those integers.
Syntax
CHAR(N [ ,... ] [ USING character_set_name ])
Arguments
-
Integer
Return Type
-
Binary string
Remarks
CHAR() returns a binary string by default.USING flag.
Examples
SELECT CHAR(101);
+-----------+
| CHAR(101) |
+-----------+
| e |
+-----------+SELECT CHAR(77, 101, 109, 83, 81, 76);
+---------------------------+
| CHAR(77,101,109,83,81,76) |
+---------------------------+
| MemSQL |
+---------------------------+
1 row in set (0.06 sec)SELECT CHARSET(CHAR(189));
+--------------------+
| CHARSET(CHAR(189)) |
+--------------------+
| binary |
+--------------------+
1 row in set (0.06 sec)SELECT CHARSET(CHAR(189 USING utf8));
+-------------------------------+
| CHARSET(CHAR(189 USING utf8)) |
+-------------------------------+
| utf8 |
+-------------------------------+
1 row in set (0.06 sec)Related Topics
Last modified: