Syntax
CHARSET(str)
Purpose
CHARSET() returns the character set used by the str string.
Examples
obclient> SELECT CHARSET("oceanbaase");
+-----------------------+
| CHARSET("oceanbaase") |
+-----------------------+
| utf8mb4 |
+-----------------------+
1 row in set
obclient> SELECT CHARSET(CONVERT("oceanbase" USING binary));
+--------------------------------------------+
| CHARSET(CONVERT("oceanbase" USING binary)) |
+--------------------------------------------+
| binary |
+--------------------------------------------+
1 row in set