Skip to main content
Version: V1.0.0

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)