Revision
Comparisons with NULL
Functions with NULL
COALESCE to the rescue
15. Data types in COALESCE
NULLIF
Revision and practice

Instruction

Excellent. Keep in mind, though, that both of the values in the function COALESCE must be of the same type. For instance, you can't write the following:

COALESCE(price,'--')

because price is a number and '–' is a text field. Such a query will return an error.

Exercise

Check it out for yourself. Try to use COALESCE to show the product name and the launch_date or 'no date' when there is no launch_date.

Then press I'm done. Next exercise to go to the next exercise.

Console

Code editor

Result

TableConsole