clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 984296 fiddles created (11703 in the last week).

CREATE TABLE test_table ( utf8_col VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin );
 hidden batch(es)


INSERT INTO test_table VALUES('ã'); # any utf8 character from U+0000 to U+FFFF
 hidden batch(es)


# Test against any utf8 character from U+0000 to U+FFFF in _utf8mb4 SELECT utf8_col, CHARSET(utf8_col) AS 'charset', COLLATION(utf8_col) AS 'collation', CONCAT(utf8_col, _utf8mb4'ñ') AS 'concat1', CHARSET(CONCAT(utf8_col, _utf8mb4'ñ')) AS 'charset_concat1' FROM test_table;
utf8_col charset collation concat1 charset_concat1
ã utf8 utf8_bin ãñ utf8
 hidden batch(es)


# Test against any utf8 character from U+10000 to U+10FFFF in _utf8mb4 SELECT utf8_col, CHARSET(utf8_col) AS 'charset', COLLATION(utf8_col) AS 'collation', CONCAT(utf8_col, _utf8mb4'🍩') AS 'concat2', CHARSET(CONCAT(utf8_col, _utf8mb4'🍩')) AS 'charset_concat2' FROM test_table;
Illegal mix of collations (utf8_bin,IMPLICIT) and (utf8mb4_0900_ai_ci,COERCIBLE) for operation 'concat'
 hidden batch(es)


SELECT utf8_col < _utf8mb4'ñ' FROM test_table;
utf8_col < _utf8mb4'ñ'
1
 hidden batch(es)


SELECT utf8_col < _utf8mb4'🍩' FROM test_table;
Illegal mix of collations (utf8_bin,IMPLICIT) and (utf8mb4_0900_ai_ci,COERCIBLE) for operation '<'
 hidden batch(es)