State the output of the following query :-
SELECT ROUND(3456.345,0);
State the output of the following query :-
SELECT ROUND(3456.345,0);
Solution
ROUND(x, d) rounds x to d decimal places. With , the number is rounded to a whole number, so only the first decimal digit decides the result.
The first decimal digit of 3456.345 is 3, which is less than 5, so the number rounds down to 3456.
Option 4: this comes from rounding in stages (), which is wrong. Only the first digit after the decimal point is checked.
Option 1: the 0 is the number of decimal places, not the output.
Option 2: this would be the result only if the number were left unrounded, but removes the decimal part.
Related questions:
2025: 30 May Shift 2
2026: 29 May Shift 1
2026: 18 May Shift 2
2025: 22 May Shift 1
2026: 29 May Shift 2