BIN(N): Returns a string representation of the binary value of N, where N is a long (BIGINT) number : BIN « String Functions « MySQL Tutorial






Returns NULL if N is NULL.

mysql>
mysql> SELECT BIN(12);
+---------+
| BIN(12) |
+---------+
| 1100    |
+---------+
1 row in set (0.00 sec)

mysql>
mysql> SELECT BIN(NULL);
+-----------+
| BIN(NULL) |
+-----------+
| NULL      |
+-----------+
1 row in set (0.00 sec)








23.3.BIN
23.3.1.BIN(N): Returns a string representation of the binary value of N, where N is a long (BIGINT) number
23.3.2.Using BIN with data in a table