Collations
The default collation in seekdb is utf8mb4_general_ci. V1.4.0 supports the following collations:
| Collation | Character set | Description |
|---|---|---|
binary | binary | Compares and sorts by byte value. |
utf8mb4_bin | utf8mb4 | Performs case-sensitive comparison and sorting by UTF-8 encoded value. |
utf8mb4_general_ci | utf8mb4 | Uses general, case-insensitive comparison and sorting rules. |
Use SHOW COLLATION to view the collations available on the current instance:
SHOW COLLATION;
Example result:
+--------------------+---------+----+---------+----------+---------+
| Collation | Charset | Id | Default | Compiled | Sortlen |
+--------------------+---------+----+---------+----------+---------+
| utf8mb4_general_ci | utf8mb4 | 45 | Yes | Yes | 1 |
| utf8mb4_bin | utf8mb4 | 46 | | Yes | 1 |
| binary | binary | 63 | Yes | Yes | 1 |
+--------------------+---------+----+---------+----------+---------+
3 rows in set
The following example specifies a case-sensitive collation for a table:
CREATE TABLE account (
name VARCHAR(100)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;