HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Format the number as "#,###,###.##" (and round with two decimal places)
The FORMAT() function formats a number to a format like "#,###,###.##", rounded to a specified number of decimal places, then it returns the result as a string.
FORMAT(number, decimal_places)
Parameter | Description |
---|---|
number | Required. The number to be formatted |
decimal_places | Required. The number of decimal places for number. If this parameter is 0, this function returns a string with no decimal places |
Works in: | From MySQL 4.0 |
---|
Format the number as a format of "#,###,###.##" (and round with 0 decimal places):
SELECT FORMAT(250500.5634, 0);