mysql>
mysql> CREATE TABLE myTable (c BINARY(3));
Query OK, 0 rows affected (0.03 sec)
mysql>
mysql> INSERT INTO myTable SET c = 'a';
Query OK, 1 row affected (0.00 sec)
mysql>
mysql> SELECT HEX(c), c = 'a', c = 'a\0\0' from myTable;
+--------+---------+-------------+
| HEX(c) | c = 'a' | c = 'a\0\0' |
+--------+---------+-------------+
| 610000 | 0 | 1 |
+--------+---------+-------------+
1 row in set (0.00 sec)
mysql>
mysql> drop table myTable;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql>