CBSE Class 12 Informatics Practices Question 68 of 81

MySQL Functions — Question 19

Back to all questions
19
Question

Question 11(ii)

Find the output of the following SQL Query :

SELECT MOD(ROUND (13.9, 0), 3);
Answer
Output
+------------------------+
| MOD(ROUND(13.9, 0), 3) |
+------------------------+
|                      2 |
+------------------------+
Explanation

In the above query, 13.9 is first rounded to the nearest whole number (0 decimal places), resulting in 14 using the ROUND function. Then, the MOD function computes the remainder of 14 divided by 3, resulting in 2. Therefore, the output of the query is 2.