Syntax
COLLATION(str)
Purpose
COLLATION() returns the collation of the str string.
You can execute the SHOW COLLATION statement to view the collations supported by OceanBase Database.
Examples
obclient> SELECT COLLATION("oceanbase");
+------------------------+
| COLLATION("oceanbase") |
+------------------------+
| utf8mb4_general_ci |
+------------------------+
1 row in set
obclient> SELECT COLLATION("oceanbase" COLLATE utf8mb4_bin);
+--------------------------------------------+
| COLLATION("oceanbase" COLLATE utf8mb4_bin) |
+--------------------------------------------+
| utf8mb4_bin |
+--------------------------------------------+
1 row in set