1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to SQL Server

Exercise

Working with NULL values

A NULL value could mean 'zero' - if something doesn't happen, it can't be logged in a table. However, NULL can also mean 'unknown' or 'missing'. So consider if it is appropriate to replace them in your results. NULL values provide feedback on data quality. If you have NULL values, and you didn't expect to have any, then you have an issue with either how data is captured or how it's entered in the database.

In this exercise, you'll practice filtering for NULL values, excluding them from results, and replacing them with alternative values.

Instructions 1/2

undefined XP
  • 1

    Use a shortcut to select all columns from grid. Then filter the results to only include rows where demand_loss_mw is unknown or missing.

  • 2

    Adapt your code to return rows where demand_loss_mw is not unknown or missing.