ROUND function is used to round numbers to the specified number of digits: Syntax: ROUND(number, decimals); when decimals is a positive value, round to the specified number of decimal places; when decimals is a negative value, round to the specified integer bits before; when decimals is 0, round to the nearest integer; when number or decimals is NULL, return NULL.
ROUND Function
#ROUND function is used to round a number to a specified number of digits.
Syntax:
<code class="sql">ROUND(number, decimals)</code>
Where:
Example:
Note:
decimals
is positive value is rounded to the specified number of decimal places. decimals
is negative, rounding to the number of integer digits preceding the specified number of digits. decimals
is 0, round to the nearest integer. number
is NULL
or decimals
is NULL
, then NULL
is returned. The above is the detailed content of What does round mean in mysql?. For more information, please follow other related articles on the PHP Chinese website!