Name
ROUND( )
Synopsis
ROUND(number
[,precision
])
This function rounds a number given in the first argument to the nearest integer. The number may be rounded to the number of decimal places given in the second argument.
SELECT ROUND(2.875), ROUND(2.875, 2); +--------------+-----------------+ | ROUND(2.875) | ROUND(2.875, 2) | +--------------+-----------------+ | 3 | 2.88 | +--------------+-----------------+
Get MySQL in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.