Loading lesson path
Concept visual
Start at both ends
Convert a number from numeric base system 10 to numeric base system 2: SELECT CONV(15,
10, 2);The CONV() function converts a number from one numeric base system to another, and returns the result as a string value.
This function returns NULL if any of the parameters are NULL.
Also look at the BIN() function.
number, from_base, to_base )
Required. A number from_base
(a number between 2 and 36) to_base The numeric base system to convert to (a number between 2 and 36 or
Formula
- 2 and - 36)From MySQL 4.0
Convert a number from numeric base system 2 to numeric base system 10:
SELECT CONV(1111, 2, 10);Convert a number from numeric base system 10 to numeric base system 16:
SELECT CONV(88, 10, 16);❮ MySQL Functions