FORMAT(X,D) : FORMAT : String Functions MySQL TUTORIALS


MySQL TUTORIALS » String Functions » FORMAT »

 

FORMAT(X,D)


Rounds X to D decimal places.

Returns the result as a string.

If D is 0, the result has no decimal point or fractional part.

mysql>
mysql> SELECT FORMAT(12332.1234564);
+-------------------------+
| FORMAT(12332.1234564|
+-------------------------+
12,332.1235             |
+-------------------------+
row in set (0.00 sec)

mysql>



Leave a Comment / Note


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

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo String Functions
» FORMAT