Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Review
3. NULL – quick review
Comparisons with NULL
Functions with NULL
COALESCE to the rescue
NULLIF
Review and practice

Instruction

Good. Let's get started and refresh your memory about NULLs.

A NULL means that the value in question is unknown or missing. In a client table, you could have a NULL last name because you forgot to ask your client for it.

In your product table, you could have a NULL product launch date if it hasn't been introduced yet. A NULL product price doesn't mean that the product is free, it simply means that the price is unknown.

We use the operators IS NULL or IS NOT NULL to check, respectively, if the value is missing or not, just like this:

SELECT *
FROM product
WHERE category IS NULL

Exercise

Select name for all products whose launch_date is not a null.

Stuck? Here's a hint!

Introduce a WHERE clause and use IS NOT NULL.