April 2008
Intermediate to advanced
566 pages
21h 55m
English
FORMAT()
FORMAT(number,decimal)
This function returns the given floating-point
number with a comma inserted between every
three digits and a period before the number of decimal places
specified in the second argument.
SELECT FORMAT(1000.375, 2) AS Amount; +----------+ | Amount | +----------+ | 1,000.38 | +----------+
Notice that the function rounds the number given to two decimal places.
Read now
Unlock full access