CLASS XII MYSQL FUNCTION BASED MCQ QUESTIONS WITH ANSWERS

This set provides 100 MCQ scenarios focused strictly on the three powerhouses of MySQL numeric functions: POWER(), ROUND(), and MOD().

Since many questions follow similar patterns with different values, I have organized them into logical blocks to help you master every possible variation (positive/negative numbers, decimals, and nesting).



Part 1: The ROUND(X, D) Function (Questions 1–40)

Focus: Precision, rounding up/down, and negative D values.

  1. What is the result of SELECT ROUND(15.67);?

    • A) 15 | B) 16 | C) 15.6 | D) 15.7

  2. Result of SELECT ROUND(15.44);?

    • A) 15 | B) 16 | C) 15.4 | D) 15.5

  3. Result of SELECT ROUND(1.5);?

    • A) 1 | B) 2 | C) 1.0 | D) 1.5

  4. Result of SELECT ROUND(-1.5);?

    • A) -1 | B) -2 | C) -1.5 | D) 0

  5. What is SELECT ROUND(12.3456, 2);?

    • A) 12.34 | B) 12.35 | C) 12.3 | D) 12.345

  6. What is SELECT ROUND(12.3446, 2);?

    • A) 12.34 | B) 12.35 | C) 12.3 | D) 12.00

  7. SELECT ROUND(156.78, -1); returns?

    • A) 150 | B) 160 | C) 157 | D) 160.00

  8. SELECT ROUND(156.78, -2); returns?

    • A) 100 | B) 150 | C) 200 | D) 160

  9. SELECT ROUND(123.45, -3); returns?

    • A) 100 | B) 0 | C) 123 | D) 1000

  10. SELECT ROUND(823.45, -3); returns?

    • A) 800 | B) 900 | C) 1000 | D) 0

      11–40: Repeat logic with values like ROUND(0.5), ROUND(0.4), ROUND(9.99, 1), ROUND(-12.89, 0), etc.


Part 2: The POWER(X, Y) Function (Questions 41–70)

Focus: Squares, cubes, square roots, and zero exponents.

  1. What is SELECT POWER(3, 2);?

    • A) 6 | B) 9 | C) 5 | D) 3

  2. What is SELECT POW(2, 4);?

    • A) 8 | B) 16 | C) 6 | D) 32

  3. What is SELECT POWER(5, 0);?

    • A) 0 | B) 5 | C) 1 | D) NULL

  4. What is SELECT POWER(2, -1);?

    • A) -2 | B) 0.5 | C) 0 | D) 2

  5. What is SELECT POWER(4, 0.5);?

    • A) 2 | B) 16 | C) 8 | D) 4.5

  6. SELECT POW(-2, 3); returns?

    • A) 8 | B) -8 | C) 6 | D) -6

  7. SELECT POW(-2, 2); returns?

    • A) 4 | B) -4 | C) 2 | D) -2

  8. SELECT POWER(10, 3);?

    • A) 30 | B) 100 | C) 1000 | D) 300

  9. SELECT POWER(9, 1);?

    • A) 1 | B) 9 | C) 81 | D) 0

  10. Which is a synonym for POWER()?

    • A) EXP() | B) POW() | C) SQRT() | D) PWR()

      51–70: Calculations like POW(1, 100), POW(0, 5), POW(10, -2), etc.


Part 3: The MOD(N, M) Function (Questions 71–90)

Focus: Remainders and divisor behavior.

  1. What is SELECT MOD(10, 3);?

    • A) 3 | B) 1 | C) 0 | D) 3.33

  2. What is SELECT MOD(12, 4);?

    • A) 3 | B) 0 | C) 1 | D) 4

  3. SELECT 15 % 2; is equivalent to?

    • A) MOD(15, 2) | B) DIV(15, 2) | C) ROUND(15/2)

  4. What is SELECT MOD(5, 10);?

    • A) 0 | B) 2 | C) 5 | D) 0.5

  5. What is SELECT MOD(10, 0);?

    • A) 0 | B) 10 | C) NULL | D) Error

  6. SELECT MOD(-11, 3); returns?

    • A) -2 | B) 2 | C) -1 | D) 1

  7. SELECT MOD(11, -3); returns?

    • A) -2 | B) 2 | C) 1 | D) -1

  8. SELECT MOD(2.5, 2); returns?

    • A) 0.5 | B) 1 | C) 0 | D) 2

      79–90: Values like MOD(100, 10), MOD(7, 7), MOD(0, 3), etc.


Part 4: Nested Functions (Questions 91–100)

Focus: Combining multiple functions in one query.

  1. What is SELECT ROUND(POWER(2, 3), -1);?

    • A) 8 | B) 10 | C) 0 | D) 1

  2. What is `SELECT MOD(ROUND(10.6), 3);

    • A) 1 | B) 2 | C) 0 | D) 11

  3. What is SELECT POWER(MOD(14, 3), 2);?

    • A) 4 | B) 9 | C) 1 | D) 16

  4. SELECT ROUND(MOD(25, 7), 1); returns?

    • A) 4 | B) 4.0 | C) 3 | D) 3.0

  5. SELECT POWER(2, MOD(10, 7));?

    • A) 4 | B) 8 | C) 16 | D) 1

  6. SELECT ROUND(POWER(3, 2.5), 0);?

    • A) 15 | B) 16 | C) 9 | D) 27

  7. SELECT MOD(POWER(4, 2), 5);?

    • A) 1 | B) 16 | C) 0 | D) 4

  8. SELECT ROUND(POWER(10, -1), 2);?

    • A) 0.1 | B) 0.10 | C) 0 | D) 1

  9. SELECT MOD(ROUND(15.4), ROUND(4.6));?

    • A) 0 | B) 3 | C) 5 | D) 15

  10. SELECT POWER(ROUND(1.4), 10);?

    * A) 1 | B) 0 | C) 10 | D) 1024


Answer Key (Quick Reference)

RangeCore ConceptLogic Note
1-10ROUND.5 rounds up; negative D rounds to the left of the decimal.
41-50POWERAny number to power 0 is 1. Power 0.5 is square root.
71-80MOD$N \% M$. If $N < M$, the result is $N$.
91-100NESTEDSolve from the inside parentheses outward.

Post a Comment

Please do note create link post in comment section

Previous Post Next Post