mysql round
时间: 2023-10-28 11:48:32 浏览: 119
MySQL 基础 - 数值函数.md
The MySQL ROUND() function is used to round a numeric value to a specified number of decimal places. It takes two parameters: the first parameter is the numeric value that needs to be rounded, and the second parameter is the number of decimal places to which the value should be rounded.
Syntax:
ROUND(numeric_value, decimal_places)
Example:
ROUND(4.567, 2) will return 4.57
In this example, the numeric value 4.567 is rounded to 2 decimal places, resulting in the value 4.57.
阅读全文