Question:medium

What will be the result of the following SQL command?

SELECT ROUND(15.678, 2);

Show Hint

Keep two decimal places. The third decimal digit is 8, so the second digit 7 is rounded up.
Updated On: Oct 20, 2026
  • 15.00
  • 15.67
  • 15.68
  • 16.00
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Split the number:
15.678 has the whole part 15 and the decimal part 0.678.
The second argument 2 tells MySQL to keep two decimal digits.

Step 2: Find the deciding digit:
The third decimal digit is 8. It decides how the second digit changes.
A digit of 5 to 9 rounds the previous digit up. A digit of 0 to 4 leaves it as it is.

Step 3: Round:
The second decimal digit is 7. It goes up to 8 because the deciding digit is 8.
The output is 15.68.

Step 4: Eliminate the other options:
Option (A) 15.00 throws away the decimal part. ROUND(15.678, 2) keeps two decimal digits, so this is wrong.
Option (B) 15.67 is a truncation. ROUND does not simply cut digits.
Option (D) 16.00 needs rounding to a whole number.

Final Answer:
SELECT ROUND(15.678, 2); returns 15.68. The answer is option (C).
Was this answer helpful?
0

Top Questions on Text Date and Math Functions in MySQL