CBSE Class 12 Informatics Practices Question 4 of 40

Practice Paper — Question 4

Back to all questions
4
Question

Question 4

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.