Mega Code Archive

 
Categories / MySQL / String
 

Get the binary representation of the values 6 and 10

mysql> mysql> mysql> SELECT CONV(6,10,2), CONV(10,10,2), BIN(8), BIN(10); +--------------+---------------+--------+---------+ | CONV(6,10,2) | CONV(10,10,2) | BIN(8) | BIN(10) | +--------------+---------------+--------+---------+ | 110          | 1010          | 1000   | 1010    | +--------------+---------------+--------+---------+ 1 row in set (0.00 sec) mysql>