How can we check that by default MySQL CHAR() function returns a binary string?



With the help of CHARSET() function, we can check which string is returned by MySQL CHAR() function. Following result set will demonstrate it −

mysql> Select CHARSET(CHAR(85));
+-------------------+
| CHARSET(CHAR(85)) |
+-------------------+
| binary            |
+-------------------+
1 row in set (0.00 sec)
Sai Subramanyam
Sai Subramanyam

Passionate, Curious and Enthusiastic.


Advertisements