Originariamente inviato da salvatore78
scusa così ?
round(float (((PRORIV+(PRORIV*proiva)/100 +0.49)/0.5*10+0.5)/10*0.5),2))
non è corretto ...

ROUND(X), ROUND(X,D)

Returns the argument X, rounded to the nearest integer. With two arguments, returns X rounded to D decimal places. D can be negative to cause D digits left of the decimal point of the value X to become zero.

mysql> SELECT ROUND(-1.23);
-> -1
mysql> SELECT ROUND(-1.58);
-> -2
mysql> SELECT ROUND(1.58);
-> 2
mysql> SELECT ROUND(1.298, 1);
-> 1.3
mysql> SELECT ROUND(1.298, 0);
-> 1
mysql> SELECT ROUND(23.298, -1);
-> 20

The return type is the same type as that of the first argument (assuming that it is integer, double, or decimal). This means that for an integer argument, the result is an integer (no decimal places).

The behavior of ROUND() when the argument is halfway between two integers depends on the C library implementation. Different implementations 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 such as TRUNCATE() or FLOOR() instead.
dal manuale mysql.....