过滤数据

/* Check the IndepYear field for an empty value. */
SELECT Name
FROM country
WHERE IndepYear IS NULL

/* Select the records for which the 
IndepYear field contains the value. */
SELECT Name
FROM country
WHERE IndepYear IS NOT NULL


Name
Aruba
Anguilla
Netherlands Antilles
American Samoa
Antarctica
French Southern territories
Bermuda
Bouvet Island
Cocos (Keeling) Islands
...

判断值是否为 NULL,不能简单地写 = NULL。为此 SELECT 语句的 WHERE 子句提供了专门的写法:IS NULL