SQL Reference

Quick Reference

The MySQL 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.

SELECT CONV(22, 10, 7);

Output

CONV(22, 10, 7)
31

Syntax

CONV(number, from_base, to_base)

Parameters

ParameterDescription
numberA number (required)
from_baseThe numeric base system of a number (a number between 2 and 36) (required)
to_baseThe numeric base system to convert to (a number between 2 and 36 or -2 and -36) (required)

SQL Notes:

  • Any work being done to modify the structure of a database or delete tables or the the database itself should only be done after making a recent backup

We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.