What does COUNT(column) exclude that COUNT(*) includes?
-
A
Rows where the column is NULL
Correct answer
-
B
Rows that duplicate earlier ones
-
C
Rows rejected by the WHERE clause
-
D
Rows whose value is zero
Correct answer
A. Rows where the column is NULL
16 views
Explanation
COUNT(column) counts only non-NULL values, whereas COUNT(*) counts every row.
Reference
Asked in: NTS, PPSC IT, Interviews
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ