Content Entry

1.11 查找空值

Published: 2008-11-13 Categories: Cookbook Tags: SQL DB2 MySQL Oracle PostgreSQL Database MSSQL IS NULL IS NOT NULL

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