select round(67.246,-1)
Answers
Answer:
When rounding an approximate-value number, the result of the ROUND() function depends on the C library. Typically, it uses the “round to nearest even” rule i.e., it rounds a value with a fractional part exactly halfway between two integers to the nearest even integer.
MySQL ROUND() function examples
We will use the orderDetails table from the sample database for the demonstration.
The following statement finds the averagThe ROUND() function returns a number which has the same data type as the number to be rounded (n)
Rounding exact-value number rules
If n is an exact-value number, the ROUND() function uses the “round toward nearest” rule.
It means the value of the fractional part of .5 or greater is rounded up to the next integer if positive or rounded down to the next integer if negative.this syntax, n is a number to be rounded and d is the number of decimal places to which the number is rounded.
The number of decimal places ( d) is optional. It defaults to zero if you skip it.
The following statements are equivalent:this syntax, n is a number to be rounded and d is the number of decimal places to which the number is rounded.
The number of decimal places ( d) is optional. It defaults to zero if you skip it.
The following statements are equivalent:Summary: in this tutorial, you will learn how to use the MySQL ROUND() function to round a number to a specified number of decimal places.
Introduction to MySQL ROUND() function
The ROUND() is a mathematical function that allows you to round a number to a specified number of decimal places.
The following shows the syntax of the ROUND() function:
Answer:
67
Explanation: