Mega Code Archive

 
Categories / MySQL Tutorial / Math Numeric Functions
 

CONV(N,from_base,to_base)

Returns NULL if any argument is NULL. The minimum base is 2. The maximum base is 36. If to_base is a negative number, N is regarded as a signed number. Otherwise, N is treated as unsigned. CONV() works with 64-bit precision. mysql> mysql> SELECT CONV('a',16,2); +----------------+ | CONV('a',16,2) | +----------------+ | 1010           | +----------------+ 1 row in set (0.00 sec) mysql>