COLLATION (String Comparison)
COLLATION (String Comparison) is a SQL function in the String Functions category. Collation determines how string comparison is performed: case-sensitive, accent-sensitive, binary, etc. The syntax is SELECT * FROM t WHERE col COLLATE utf8mb4_unicode_ci = 'value';. It accepts see syntax. It returns collation-aware comparison. A typical example: -- MySQL collations: SELECT * FROM users WHERE name COLLATE utf8mb4_bin = 'Alice'; -- Binary collation: case-sensitive, accent-sensitive SELECT * FROM users WHERE name COLLATE utf8mb4_unicode_ci = 'alice'; -- Case-insensitive, accent-insensitive -- PostgreSQL: SELECT * FROM users WHERE name COLLATE "en-US-x-icu" = 'Alice'; -- SQL Server: SELECT * FROM users WHERE name COLLATE SQL_Latin1_General_CP1_CI_AS = 'Alice'; -- Common suffixes: -- _CI: Case Insensitive, _CS: Case Sensitive -- _AI: Accent Insensitive,… A close relative is CONCAT(), which concatenates two or more strings into one string. Returns NULL if any argument is NULL. A close relative is SUBSTRING(), which extracts characters from a string starting at position `start` for `length` characters.