Skip to content
Question

Q.Find the output of the following SQL Queries :

(i) SELECT ROUND (7658.345,2);
(ii) SELECT MOD(ROUND (13.9,0),3);
(OR)
Give any two differences between the POWER( ) and SUM( ) SQL functions.
CBSECBSE Class XII Board 2022Subjective· 2mImportance★★★★★
✓ Free question

Part (a): ROUND(7658.345,2) = 7658.35 and MOD(ROUND(13.9,0),3) = 2.

Part (b): POWER() is a single-row numeric (math) function, while SUM() is an aggregate that totals many rows.

SQL numeric functions transform values right inside the query. ROUND(number, d) returns the number rounded to d decimal places, and MOD(a, b) returns the remainder after dividing a by b. Nested calls are evaluated from the inside out.

(i) SELECT ROUND(7658.345, 2); — keep two decimals. The digit just after the second decimal is 5, so standard rounding pushes the second decimal from 4 to 5.

SELECT ROUND(7658.345, 2);
7658.35

(ii) SELECT MOD(ROUND(13.9, 0), 3); — first ROUND(13.9, 0) = 14 (nearest whole number, since .9 > .5). Then MOD(14, 3) = 2.

SELECT MOD(ROUND(13.9, 0), 3);
2
✓Final answer

(i) 7658.35 (ii) 2

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.