Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Review
Comparisons with NULL
Functions with NULL
COALESCE to the rescue
15. Data types in COALESCE
NULLIF
Review 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 click I'm done. Next exercise to go to the next exercise.