What does COALESCE(a, b, c) return?
-
A
The sum of all its arguments
-
B
NULL if any argument is NULL
-
C
The first argument that is not NULL
Correct answer
-
D
The last argument that is not NULL
Correct answer
C. The first argument that is not NULL
16 views
Explanation
COALESCE scans its arguments left to right and returns the first non-NULL value.
Reference
Asked in: NTS, PPSC IT, Interviews
Doubts & discussion
Not sure why the answer is C? Ask here and get an explanation.
Ask a doubt about this MCQ