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).



Mastering MySQL numeric operations is critical for data analysis, query optimization, and generating accurate reports. Click your selected choice for any calculation below to lock in your answer and instantly reveal the step-by-step mathematical logic breakdown!

MySQL Math Functions Quick Reference

Function Block Core Concept Definition Logic Note Rule
ROUND(X, D) Precision & Positional Rounding Values equal to or greater than 0.5 round up; negative D parameters round values to the left of the decimal point.
POWER(X, Y) Exponential Calculations Any non-zero base raised to the power of 0 returns 1. A fractional exponent like 0.5 computes the square root.
MOD(N, M) Remainder Systems Yields the remaining dividend. If N is less than M, the output returns N completely. Symbolized via the % operator.
NESTED SYSTEM Multi-Layer Expressions Always execute calculations starting from the absolute innermost parenthesis level moving outward!

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

Question 1 Not Answered

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

A) 15
B) 16
C) 15.6
D) 15.7
Correct Answer: Option B (16)
Logic: When the second parameter D is omitted, it defaults to 0. Since the fractional part .67 is greater than or equal to .5, the value rounds up to the nearest whole integer.
Question 2 Not Answered

Result of SELECT ROUND(15.44);?

A) 15
B) 16
C) 15.4
D) 15.5
Correct Answer: Option A (15)
Logic: The fractional component (.44) is less than .5, causing the expression to round down to 15.
Question 3 Not Answered

Result of SELECT ROUND(1.5);?

A) 1
B) 2
C) 1.0
D) 1.5
Correct Answer: Option B (2)
Logic: Fractional values exactly matching .5 round away from zero up to the next absolute integer.
Question 4 Not Answered

Result of SELECT ROUND(-1.5);?

A) -1
B) -2
C) -1.5
D) 0
Correct Answer: Option B (-2)
Logic: MySQL rounds numeric coordinates away from zero, converting -1.5 down to -2.
Question 5 Not Answered

What is SELECT ROUND(12.3456, 2);?

A) 12.34
B) 12.35
C) 12.3
D) 12.345
Correct Answer: Option B (12.35)
Logic: D=2 specifies two decimal places. The third decimal place digit is 5, causing the second digit to round up from 4 to 5.
Question 6 Not Answered

What is SELECT ROUND(12.3446, 2);?

A) 12.34
B) 12.35
C) 12.3
D) 12.00
Correct Answer: Option A (12.34)
Logic: The third value digit following the decimal point is 4 (less than 5), leaving the preceding index step unchanged at 12.34.
Question 7 Not Answered

SELECT ROUND(156.78, -1); returns?

A) 150
B) 160
C) 157
D) 160.00
Correct Answer: Option B (160)
Logic: Negative index -1 instructs the processor to round to the tens place. The unit digit 6 is $\ge 5$, rounding 156 up to 160.
Question 8 Not Answered

SELECT ROUND(156.78, -2); returns?

A) 100
B) 150
C) 200
D) 160
Correct Answer: Option C (200)
Logic: D=-2 targets the hundreds place. The tens place digit is 5, causing the hundreds place digit to increment up to 200.
Question 9 Not Answered

SELECT ROUND(123.45, -3); returns?

A) 100
B) 0
C) 123
D) 1000
Correct Answer: Option B (0)
Logic: D=-3 targets the thousands position. Since 123 is less than 500, the system rounds down completely to 0.
Question 10 Not Answered

SELECT ROUND(823.45, -3); returns?

A) 800
B) 900
C) 1000
D) 0
Correct Answer: Option C (1000)
Logic: D=-3 rounds to the thousands place. The hundreds place digit is 8 ($\ge 5$), so it rounds up to 1000.

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

Question 41 Not Answered

What is SELECT POWER(3, 2);?

A) 6
B) 9
C) 5
D) 3
Correct Answer: Option B (9)
Logic: Calculates 3 raised to the power of 2 ($3^2 = 3 \times 3 = 9$).
Question 42 Not Answered

What is SELECT POW(2, 4);?

A) 8
B) 16
C) 6
D) 32
Correct Answer: Option B (16)
Logic: POW() is shorthand for POWER(). It calculates $2^4 = 2 \times 2 \times 2 \times 2 = 16$.
Question 43 Not Answered

What is SELECT POWER(5, 0);?

A) 0
B) 5
C) 1
D) NULL
Correct Answer: Option C (1)
Logic: Mathematically, any non-zero value raised to the power of 0 always yields exactly 1.
Question 44 Not Answered

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

A) -2
B) 0.5
C) 0
D) 2
Correct Answer: Option B (0.5)
Logic: Negative exponents denote a reciprocal equation footprint ($2^{-1} = \frac{1}{2^1} = 0.5$).
Question 45 Not Answered

What is SELECT POWER(4, 0.5);?

A) 2
B) 16
C) 8
D) 4.5
Correct Answer: Option A (2)
Logic: Raising an argument to the power of 0.5 calculates its square root ($\sqrt{4} = 2$).
Question 46 Not Answered

SELECT POW(-2, 3); returns?

A) 8
B) -8
C) 6
D) -6
Correct Answer: Option B (-8)
Logic: A negative base multiplied by an odd exponent retains its negative sign ($(-2) \times (-2) \times (-2) = -8$).
Question 47 Not Answered

SELECT POW(-2, 2); returns?

A) 4
B) -4
C) 2
D) -2
Correct Answer: Option A (4)
Logic: A negative base multiplied by an even exponent results in a positive product ($(-2) \times (-2) = 4$).
Question 48 Not Answered

SELECT POWER(10, 3);?

A) 30
B) 100
C) 1000
D) 300
Correct Answer: Option C (1000)
Logic: Computing cubes base 10 evaluates directly to $10 \times 10 \times 10 = 1000$.
Question 49 Not Answered

SELECT POWER(9, 1);?

A) 1
B) 9
C) 81
D) 0
Correct Answer: Option B (9)
Logic: Any numeric expression raised to the power of 1 returns the original base value.
Question 50 Not Answered

Which is a synonym for POWER()?

A) EXP()
B) POW()
C) SQRT()
D) PWR()
Correct Answer: Option B (POW())
Logic: POW() is a direct native system implementation alias for POWER().

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

Question 71 Not Answered

What is SELECT MOD(10, 3);?

A) 3
B) 1
C) 0
D) 3.33
Correct Answer: Option B (1)
Logic: 10 divided by 3 equals 3 with a remainder of 1 ($10 = 3 \times 3 + 1$).
Question 72 Not Answered

What is SELECT MOD(12, 4);?

A) 3
B) 0
C) 1
D) 4
Correct Answer: Option B (0)
Logic: Because 12 is cleanly divisible by 4, the calculated remaining integer remainder evaluates to 0.
Question 73 Not Answered

SELECT 15 % 2; is equivalent to?

A) MOD(15, 2)
B) DIV(15, 2)
C) ROUND(15/2)
Correct Answer: Option A (MOD(15, 2))
Logic: The percentage sign symbol character (%) acts as a standard mathematical modulo alias operator.
Question 74 Not Answered

What is SELECT MOD(5, 10);?

A) 0
B) 2
C) 5
D) 0.5
Correct Answer: Option C (5)
Logic: When the dividend N is smaller than the divisor M, the remainder matches N ($5 \pmod{10} = 5$).
Question 75 Not Answered

What is SELECT MOD(10, 0);?

A) 0
B) 10
C) NULL
D) Error
Correct Answer: Option C (NULL)
Logic: Division by zero is mathematically undefined, causing MySQL to return NULL without crashing.
Question 76 Not Answered

SELECT MOD(-11, 3); returns?

A) -2
B) 2
C) -1
D) 1
Correct Answer: Option A (-2)
Logic: In MySQL, the sign of the result depends entirely on the sign of the first argument (dividend). Hence, $-11 \pmod 3 = -2$.
Question 77 Not Answered

SELECT MOD(11, -3); returns?

A) -2
B) 2
C) 1
D) -1
Correct Answer: Option C (1)
Logic: The divisor's sign (-3) does not affect the calculation sign output pattern. Since 11 is positive, the result is positive 1.
Question 78 Not Answered

SELECT MOD(2.5, 2); returns?

A) 0.5
B) 1
C) 0
D) 2
Correct Answer: Option A (0.5)
Logic: MySQL handles fractional modulo equations accurately. 2 goes into 2.5 once, leaving a remainder of 0.5.

Part 4: Nested Functions (Questions 91–100)

Question 91 Not Answered

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

A) 8
B) 10
C) 0
D) 1
Correct Answer: Option B (10)
Logic: First, evaluate POWER(2,3) = 8. Then, ROUND(8, -1) rounds 8 to the nearest tens place, giving 10.
Question 92 Not Answered

What is SELECT MOD(ROUND(10.6), 3);?

A) 1
B) 2
C) 0
D) 11
Correct Answer: Option B (2)
Logic: ROUND(10.6) evaluates to 11. Then, 11 modulo 3 leaves a remainder of 2.
Question 93 Not Answered

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

A) 4
B) 9
C) 1
D) 16
Correct Answer: Option D (16)
Logic: MOD(14, 3) evaluates to 2. Then, 2 raised to the power of 4 is computed as $2^4 = 16$.
Question 94 Not Answered

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

A) 4
B) 4.0
C) 3
D) 3.0
Correct Answer: Option B (4.0)
Logic: MOD(25, 7) equals 4. ROUND(4, 1) preserves the requested precision formatting, outputting 4.0.
Question 95 Not Answered

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

A) 4
B) 8
C) 16
D) 1
Correct Answer: Option B (8)
Logic: Inner block MOD(10, 7) equals 3. The expression simplifies to POWER(2, 3), which is 8.
Question 96 Not Answered

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

A) 15
B) 16
C) 9
D) 27
Correct Answer: Option B (16)
Logic: $3^{2.5} = 3^2 \times \sqrt{3} = 9 \times 1.732 = 15.588$. Rounding 15.588 with D=0 yields 16.
Question 97 Not Answered

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

A) 1
B) 16
C) 0
D) 4
Correct Answer: Option A (1)
Logic: Inner function evaluates to $4^2 = 16$. 16 modulo 5 leaves a remaining value of 1 ($16 = 3 \times 5 + 1$).
Question 98 Not Answered

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

A) 0.1
B) 0.10
C) 0
D) 1
Correct Answer: Option B (0.10)
Logic: $10^{-1}$ equals 0.1. ROUND(0.1, 2) maintains the requested trailing positional precision scale format, rendering as 0.10.
Question 99 Not Answered

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

A) 0
B) 3
C) 5
D) 15
Correct Answer: Option A (0)
Logic: Arguments resolve individually: ROUND(15.4) = 15 and ROUND(4.6) = 5. Since 15 is perfectly divisible by 5, the remainder is 0.
Question 100 Not Answered

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

A) 1
B) 0
C) 10
D) 1024
Correct Answer: Option A (1)
Logic: Inner function rounds 1.4 down to 1. Computing 1 to any power ($1^{10}$) evaluates to 1.

Practice makes perfect! Use these interactive segments to confidently test your database calculation logic before exam day.

Post a Comment

Please do note create link post in comment section

Previous Post Next Post