Recipe 1.11. Finding Null ValuesProblemYou want to find all rows that are null for a particular column. SolutionTo determine whether a value is null, you must use IS NULL: 1 select * 2 from emp 3 where comm is null DiscussionNULL is never equal/not equal to anything, not even itself, therefore you cannot use = or != for testing whether a column is NULL. To determine whether or not a row has NULL values you must use IS NULL. You can also use IS NOT NULL to find rows without a null in a given column. |