Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
3. A quick review of NULLs
The COALESCE() function
The GREATEST() & LEAST() functions
The NULLIF() function


Okay, now let's do a quick review of NULLs.

A NULL indicates that a value is unknown or missing. You might see a NULL in the last_name field of a client table if you don't have the client's last name (because you forgot to ask!). You may have a NULL in the launch_date field of a product table if that product hasn't been launched.

A NULL in a product_price field doesn't mean that the product is free, just that we don't know the price.

We use the operators IS NULL and IS NOT NULL to check if a value is NULL. IS NULL works like this:

FROM product
WHERE category IS NULL;


Select name for all products whose launch_date isn't a NULL.