ethernal Chercheur de vérité... |
pour les fainéants qui passeront après alors :
Code :
- 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 behaviour 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 toward 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:
- mysql> SELECT ROUND(1.298, 1);
- -> 1.3
- mysql> SELECT ROUND(1.298, 0);
- -> 1
|
---------------
...oups kernel error...
|