display numbers with zero pad
You can use a case expression:

select case when number between 0 and 9 then '0' else '' end 
    || number as n 
from t;


Note that || is the sql-standard operator for string concatenation. Unless properly configured MySQL will treat || as logical OR. This behavior is determined by the setting PIPES_AS_CONCAT. You can also enable this and other sane settings with ANSI. You can see what settings you have with:

select @@sql_mode;


It can be changed using: 

set @@sql_mode=@@sql_mode || ',PIPES_AS_CONCAT';


or by modifying the config file

However this is purely presentation so I think you should do the formatting of the result in the application instead.