bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL CONV() Function

Example

SELECT CONV(15,
10, 2);

Definition and Usage

The CONV() function converts a number from one numeric base system to another, and returns the result as a string value.

Note

This function returns NULL if any of the parameters are NULL.

Tip

Also look at the BIN() function.

Syntax

CONV(
number
,
from_base
,
to_base
)

Parameter Values

ParameterDescription
numberRequired. A number
from_baseThe numeric base system of number (a number between 2 and 36)
to_baseThe numeric base system to convert to (a number between 2 and 36 or -2 and -36)

Technical Details

Works in:From MySQL 4.0

Previous

MySQL CONNECTION_ID() Function

Next

MySQL CONVERT() Function