🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Filtering and Sorting: all 10 questions

Quiz: Filtering and Sorting · Question 8 of 10

What does COALESCE(deptid, 0) give for an employee whose deptid is NULL?

What does COALESCE(dept_id, 0) give for an employee whose dept_id is NULL?

  1. A.NULL
  2. B.0
  3. C.An error
  4. D.The first department in the table
Answer & explanation

Correct answer: 0

COALESCE returns the first value that is not NULL.

Can you get the rest right without peeking?

Take the timed Quiz: Filtering and Sorting quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →