You can't filter for NULL values the same way you can filter on other values. For instance, you can't use comparison operators, which were covered earlier in this chapter. These include =, >, < , and <>. You need to filter NULL values with IS NULL or IS NOT NULL.
The following query will return the results for NULL values in g_defense:
USE lahmansbaseballdb;SELECT playerid, g_all, g_batting, g_defenseFROM appearancesWHERE g_defense IS NULL;
The previous query will return the results shown in the following screenshot. All the g_defense values will be NULL:
The following query will return the results ...