title: Converting Numbers to Words in MYSQL result! Using Query
body: <p>I am trying to print a output as follows when I execute a query in mysql.</p>
  
  <pre><code>Name    Salary  Sal_in_Words
  Mohan   45000   Rupees Forty Five Thousand Only
  </code></pre>
  
  <p>The column Salary has a value 45000 and in the third column the Value in second colunm is converted to words through Query.</p>
  
  <p>I found some article where in Oracle we can get the result as above using the below query:</p>
  
  <pre><code>select Salary, (' Rs. '|| (to_char(to_date(sal,'j'), 'Jsp'))|| ' only.')) Sal_in_Words from employee
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <pre><code>Name    Salary  Sal_in_Words
  Suresh  45000   Rupees Forty Five Thousand Only
  </code></pre>
  
  <p>In MySQL I tried LPAD,RPAD but those just adds strings to the result not converting words to string.</p>
  
  <p>I found some tutorial but all those explained about "TO_CHAR (dates)".</p>
  
  <p>Is there any way to do it?</p>