Databases · Junior · Question 59 of 75

What does COALESCE(nickname, name) return?

Explanation

COALESCE returns the first non-NULL argument. It's handy for defaults, e.g. COALESCE(SUM(amount), 0) when there are no rows.

Further reading

Problem with a question

Databases · Junior · question 59

Test yourself

Take the Databases · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz