1. Home
  2. Data Science
  3. SQL for Data Analysis
  4. What does COALESCE(a, b, c) return?

Added 30 Nov -0001

What does COALESCE(a, b, c) return?

  1. The sum of all its arguments
  2. NULL if any argument is NULL
  3. The first argument that is not NULL Correct answer
  4. The last argument that is not NULL

Correct answer

C. The first argument that is not NULL

16 views

MCQSEXAM

Explanation

COALESCE scans its arguments left to right and returns the first non-NULL value.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More SQL for Data Analysis MCQs

Practise all SQL for Data Analysis MCQs

Similar MCQs