How does AVG treat NULL values in its column?
-
A
It ignores them entirely
Correct answer
-
B
It treats them as zeros
-
C
It returns NULL for the column
-
D
It raises an error on NULL
Correct answer
A. It ignores them entirely
16 views
Explanation
AVG sums the non-NULL values and divides by their count, so NULLs are skipped.
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