I have a procedure I am doing that displays odds but the client wants only significant digits to be shown. So, 1.50 would show as \'1.5\' and 1.00 would show as \'1\'.
Taking fragments of the others answers in this page I came to this conclusion:
SELECT ( IF( myfield LIKE '%.%', TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM myfield)), myfield ) ) FROM mytable
Cheers