Product Solutions Support
Try MemSQL

CHAR

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 charset])

Arguments

Return Type

Remarks

CHAR() returns a binary string by default. To return a string in a different character set, use the optional USING flag.

Examples

memsql> select char(77,101,109,83,81,76);
+---------------------------+
| char(77,101,109,83,81,76) |
+---------------------------+
| MemSQL                    |
+---------------------------+
1 row in set (0.06 sec)

memsql> select charset(char(189));
+--------------------+
| charset(char(189)) |
+--------------------+
| binary             |
+--------------------+
1 row in set (0.06 sec)

memsql> select charset(char(189 using utf8));
+-------------------------------+
| charset(char(189 using utf8)) |
+-------------------------------+
| utf8                          |
+-------------------------------+
1 row in set (0.06 sec)


Was this article useful?