CHARSET
Syntax
CHARSET(str)
Description
Returns the character set used by the string str.
Example
SELECT CHARSET("oceanbaase");
+-----------------------+
| CHARSET("oceanbaase") |
+-----------------------+
| utf8mb4 |
+-----------------------+
1 row in set (0.001 sec)
SELECT CHARSET(CONVERT("oceanbase" USING binary));
+--------------------------------------------+
| CHARSET(CONVERT("oceanbase" USING binary)) |
+--------------------------------------------+
| binary |
+--------------------------------------------+
1 row in set (0.001 sec)