Content Entry

1.11 查找空值

Q: 查找某列值为空的行
A: 使用 IS NULL,或者 IS NOT NULL

Oracle,MySQL,PostgreSQL,MSSQL,DB2 (使用IS NULL, IS NOT NULL)
SELECT *
FROM emp
WHERE comm IS NULL

Tables Used:
for MySQL
http://www.hooto.com/home/rui/doc/archives/5089.html
for PostgreSQL
http://www.hooto.com/home/rui/doc/archives/5090.html

Learn:
SQL Cookbook, by Anthony Molinaro.
Copyright 2006 O'Reilly Media, Inc.

--EOF--

comments loading