- Related Questions & Answers
- Add minimum number to an array so that the sum becomes even in C programming
- C++ Program for Dijkstra’s shortest path algorithm?
- C/C++ Program for nth Catalan Number?
- C Program to Check if all digits of a number divide it
- Concatenate a string given number of times in C++ programming
- Bitset all() function in C++ STL
- Write a function that returns 2 for input 1 and returns 1 for 2 in C programming
- Ways to paint N paintings such that adjacent paintings don’t have same colors in C programming
- Superperfect Number in C programming
- HTML DOM Input Number value Property
- HTML DOM Input Number type Property
- How to find the number of days in a month of a particular year in Java?
- Number of elements a particular tag contains in JavaScript?
- Print multiples of Unit Digit of Given Number in C Program
- C/C++ Programming to Count trailing zeroes in factorial of a number?

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

MySQL returns 0 as output if the number given in CONV() function is not as per accordance with its base. Suppose, if we want to convert decimal number 9 into the number in binary number system then in this case the value of from_base must be 10 but if we provide 8 as the value of from_base then MySQL returns 0 as output.

mysql> Select CONV(9,8,2); +-------------+ | CONV(9,8,2) | +-------------+ | 0 | +-------------+ 1 row in set (0.00 sec)

As we know that the values of octal number system must be between 0 to 7, hence the number system for number 9 must be decimal i.e. 10.

Advertisements