Examples of the Effect of Collation “Comparison”  in this context does not include the  LIKE  pattern-matching operator, for which trailing spaces are significant, regardless of collation. For binary strings ( BINARY ,  VARBINARY , and  BLOB  values), all bytes are significant in comparisons, including trailing spaces: CHAR( N )  columns store nonbinary strings  N  characters long. For inserts, values shorter than  N  characters are extended with spaces. For retrievals, trailing spaces are removed. BINARY( N )  columns store binary strings  N  bytes long. For inserts, values shorter than  N  bytes are extended with  0x00  bytes. For retrievals, nothing is removed; a value of the declared length is always returned. 1958 Example 1: Sorting German Umlauts 10.8.6 Examples of the Effect of Collation Trailing Space Handling for Inserts and Retrievals Note WHERE COLLATION_NAME LIKE ’utf8mb4%bin’; +------------------+---------------+ | COLLATION_NAME | PAD_ATTRIBUTE | +------------------+---------------+ | utf8mb4_bin | PAD SPACE | | utf8mb4_0900_bin | NO PAD | +------------------+---------------+ mysql>  SET NAMES utf8mb4 COLLATE utf8mb4_bin; mysql>  SELECT ’a ’ = ’a’; +------------+ | ’a ’ = ’a’ | +------------+ | 1 | +------------+ mysql>  SET NAMES utf8mb4 COLLATE utf8mb4_0900_bin; mysql>  SELECT ’a ’ = ’a’; +------------+ | ’a ’ = ’a’ | +------------+ | 0 | +------------+ mysql>  SET NAMES binary; mysql>  SELECT ’a ’ = ’a’; +------------+ | ’a ’ = ’a’ | +------------+ | 0 | +------------+ mysql>  CREATE TABLE t1 ( a CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin, b BINARY(10) ); mysql>  INSERT INTO t1 VALUES (’x’,’x’); mysql>  INSERT INTO t1 VALUES (’x ’,’x ’); mysql>  SELECT a, b, HEX(a), HEX(b) FROM t1; +------+------------+--------+----------------------+ | a | b | HEX(a) | HEX(b) | +------+------------+--------+----------------------+ | x | x | 78 | 78000000000000000000 | | x | x | 78 | 78200000000000000000 | +------+------------+--------+----------------------+