CONV Function

Description

The CONV function converts numbers between different number bases. This function returns a string representation of a converted number.

The minimum value is 2 and the maximum value is 36. If to_base (representing the base to be returned) is negative, number is regarded as a signed number. Otherwise, it regarded as a unsigned number.

Syntax

CONV(number,from_base,to_base)

Example

SELECT CONV('f',16,2);

'1111'

SELECT CONV('6H',20,8);

'211'

SELECT CONV(-30,10,-20);