← 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?
- A.NULL
- B.0
- C.An error
- 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 →