State the output of the following query:
SELECT ROUND(9873.567,-2);
State the output of the following query:
SELECT ROUND(9873.567,-2);
Solution
✅ Correct Option: 1
A negative second argument in ROUND() rounds to the left of the decimal point. means round to the nearest hundred.
The last two digits before the decimal point are , and , so the hundreds digit rounds up.
Option 3: 9800 is what you get by truncating, as TRUNCATE(9873.567,-2) does. ROUND rounds to the nearest value, and 9873.567 is closer to 9900 than to 9800.
Options 2 and 4: these keep the decimal part by dropping digits. A negative position always affects digits to the left of the decimal point.
Related questions:
2025: 14 May Shift 1
2026: 19 May Shift 1