Skip to main content
Version: V1.4.1

Collations

The default collation in seekdb is utf8mb4_general_ci. V1.4.1 supports the following collations:

CollationCharacter setDescription
binarybinaryCompares and sorts by byte value.
utf8mb4_binutf8mb4Performs case-sensitive comparison and sorting by UTF-8 encoded value.
utf8mb4_general_ciutf8mb4Uses general, case-insensitive comparison and sorting rules.
utf8mb4_unicode_ciutf8mb4Uses Unicode Collation Algorithm weights for case-insensitive and accent-insensitive comparison and sorting.

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 |
| utf8mb4_unicode_ci | utf8mb4 | 224 | | Yes | 8 |
| binary | binary | 63 | Yes | Yes | 1 |
+--------------------+---------+-----+---------+----------+---------+
4 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;