CBSE Class 12 Informatics Practices Question 31 of 79

Database Query using SQL — Question 2

Back to all questions
2
Question

Question 2

Which values will not be considered by SQL while executing the following statement?

SELECT COUNT(column name) FROM DEPARTMENT;
  1. Numeric value
  2. Text value
  3. Null value
  4. Date value
Answer

Null value

Reason — The COUNT() function in SQL counts only non-null values in a column. It does not consider null values while executing the statement. Therefore, null values will not be counted by the COUNT() function in the given SQL statement.