A table has 10 rows, and 3 of them have NULL in the email column. What does SELECT COUNT(email) return?
Correct answer
D. 7
16 views
D. 7
16 views
COUNT(column) skips NULLs, so it returns 7. COUNT(*) counts every row and would return 10.
Asked in: GATE CS, NTS, Technical Interviews
Not sure why the answer is D? Ask here and get an explanation.