Si potrebbe fare anche:

select dayofmonth(nome campo) as giorno.
Se è un campo data
dayofmonth() è una funzione specifica di mysql