MySQL Forums
Forum List  »  General

AVG returns too few decimal places
Posted by: Bad Programmer
Date: March 05, 2015 08:22AM

I'm using the AVG aggregate on an smallint field in a query.
The actual average often has significantly more than 4 decimal places.
When I get the returned value I only get 4 decimal places, rounded.

I need the entire result because I have to display averages of averages.
My numbers are off a bit and my clients don't like it.

Is there any way to make MySql return the whole number without rounding or at least increase the number of decimal places for the AVG aggregate function?

Options: ReplyQuote


Subject
Written By
Posted
AVG returns too few decimal places
March 05, 2015 08:22AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.