What is the use of MySQL CHAR() function?

MySQLMySQLi Database

In MySQL, is it possible to get the character value of the given integer value based on the ASCII table?

MySQL CHAR() function is used to return the character value of the given integer value according to the ASCII table. Its syntax is as follows −

Syntax

CHAR(N,…[USING charset_name])

Here N, are the integers whose characters' values are to be retrieved.

Example

mysql> Select CHAR(65,66,67,68);
+-------------------+
| CHAR(65,66,67,68) |
+-------------------+
| ABCD              |
+-------------------+
1 row in set (0.00 sec)
raja
Published on 21-Feb-2018 08:18:47
Advertisements