Do radix conversion for input parameter.
CONV(<input>, <from_base>, <to_base>)
| Parameter | Description |
|---|---|
<input> | Parameters to be converted, either as strings or integers |
<from_base> | Numeric, the source base, within [2,36]. |
<to_base> | Numeric, the target base, within [2,36]. |
The number under the converted target binary <to_base> is returned as a string.
SELECT CONV(15,10,2);
+-----------------+ | conv(15, 10, 2) | +-----------------+ | 1111 | +-----------------+
SELECT CONV('ff',16,10);
+--------------------+ | conv('ff', 16, 10) | +--------------------+ | 255 | +--------------------+
SELECT CONV(230,10,16);
+-------------------+ | conv(230, 10, 16) | +-------------------+ | E6 | +-------------------+