CBSE Class 12 Informatics Practices Question 40 of 81

MySQL Functions — Question 22

Back to all questions
22
Question

Question 22

Predict the output of the following query :

SELECT MOD(9, 0);
  1. 0
  2. NULL
  3. NaN
  4. 9
Answer

NULL

Reason — The MOD() function returns NULL when the divisor is zero because division by zero is undefined in SQL.