Mega Code Archive

 
Categories / MySQL Tutorial / Math Numeric Functions
 

How rounding differs for exact and approximate values

mysql> mysql> SELECT ROUND(2.5), ROUND(25E-1); +------------+--------------+ | ROUND(2.5) | ROUND(25E-1) | +------------+--------------+ |          3 |            2 | +------------+--------------+ 1 row in set (0.00 sec) mysql>