Next:
Nested Subqueries
Up:
SQL
Previous:
Aggregate Functions
Null Values
With insertions, we saw how
null
values might be needed if values were unknown. Queries involving nulls pose problems.
If a value is not known, it cannot be compared or be used as part of an aggregate function.
All comparisons involving null are
false
by definition. However, we can use the keyword
null
to test for null values:
select distinct
loan#
from
loan
where
amount
is null
All aggregate functions except
count
ignore tuples with null values on the argument attributes.
Osmar Zaiane
Fri May 22 19:39:12 PDT 1998