Flash cards
Review the key moves
1/4
Core idea
What is the main idea behind MySQL CONV() Function?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
1Quick choice
Which statement best captures the main point of this lesson?
2Fill blank
Complete the missing token from the example code.
___ CONV(15,3Order
Put the learning moves in the order that makes the concept easiest to apply.
The CONV() function converts a number from one numeric base system to another, and returns the result as a string value.
Definition and Usage
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
| Parameter | Description |
|---|---|
| number | Required. A number |
| from_base | The numeric base system of number (a number between 2 and 36) |
| to_base | The numeric base system to convert to (a number between 2 and 36 or -2 and -36) |
Technical Details
| Works in: | From MySQL 4.0 |
|---|