ROUND(X), ROUND(X,D) rounds the argument X to D decimal places. : ROUND : Math Numeric Functions MySQL TUTORIALS


MySQL TUTORIALS » Math Numeric Functions » ROUND »

 

ROUND(X), ROUND(X,D) rounds the argument X to D decimal places.


  1. D defaults to 0 if not specified.
  2. D can be negative to cause D digits left of the decimal point of the value X to become zero.
mysql>
mysql> SELECT ROUND(-1.23);
+--------------+
| ROUND(-1.23|
+--------------+
|           -|
+--------------+
row in set (0.00 sec)

mysql> SELECT ROUND(-1.58);
+--------------+
| ROUND(-1.58|
+--------------+
|           -|
+--------------+
row in set (0.00 sec)

mysql> SELECT ROUND(1.58);
+-------------+
| ROUND(1.58|
+-------------+
|           |
+-------------+
row in set (0.00 sec)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Math Numeric Functions
» ROUND