bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL ROUND() Function

Example

SELECT ROUND(135.375, 2);

Definition and Usage

The ROUND() function rounds a number to a specified number of decimal places.

Note

See also the FLOOR() , CEIL() , CEILING() , and TRUNCATE() functions.

Syntax

ROUND(
number
,
decimals
)

Parameter Values

ParameterDescription
numberRequired. The number to be rounded
decimalsOptional. The number of decimal places to round number to. If omitted, it returns the integer (no decimals)

Technical Details

Works in:From MySQL 4.0

Previous

MySQL RAND() Function

Next

MySQL SIGN() Function