>From :
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Fun
ctions

ROUND(X)
Returns the argument X, rounded to the nearest integer:
mysql> select ROUND(-1.23);
        -> -1
mysql> select ROUND(-1.58);
        -> -2
mysql> select ROUND(1.58);
        -> 2

Note that the behavior of ROUND() when the argument is half way between two
integers depends on the C library implementation. Some round to the nearest
even number, always up, always down, or always towards zero. If you need one
kind of rounding, you should use a well-defined function like TRUNCATE() or
FLOOR() instead.

ROUND(X,D)
Returns the argument X, rounded to a number with D decimals. If D is 0, the
result will have no decimal point or fractional part:

Also, From the mailing list:
 Before posting, please check:
    http://www.mysql.com/manual.php   (the manual)

Ryan Fox


----- Original Message -----
From: "Attila Soki" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 10, 2001 12:40 PM
Subject: mysql round problem


> hi,
>
> is this bug already in buglist, maybe in newer verisons of mysql is
already
> corrected?
> if yes then please let me know please from what version.
>
> the probmlem:
>
> select round(9.065,2)
> +----------------+
> | round(9.065,2) |
> +----------------+
> |           9,06 |
> +----------------+
>
> why not 9,07 ??
>
> cheers,
>
> Attila Soki



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to