SELECT SYSDATE FROM DUAL WHERE '' is null;
SYSDATE
---------
19-AUG-09
SELECT SYSDATE FROM DUAL WHERE '' = NULL;
no rows selected
SQL> SELECT SYSDATE FROM DUAL WHERE '' = '';
no rows selected
SELECT SYSDATE FROM DUAL WHERE NULL = NULL;
no rows selected
SELECT SYSDATE FROM DUAL WHERE NULL != NULL;
no rows selected
SELECT SYSDATE FROM DUAL WHERE NULL IS NULL;
SYSDATE
---------
19-AUG-09
SELECT SYSDATE FROM DUAL WHERE '' IS NOT NULL;
no rows selected
SELECT SYSDATE FROM DUAL WHERE 'A' IS NULL;
no rows selected
SELECT SYSDATE FROM DUAL WHERE 'A' IS NOT NULL;
SYSDATE
---------
19-AUG-09
不要把NULL 和 其他任何东西做比较, 结果都是false,用 IS NULL 或者 IS NOT NULL.
空字符窜 '' 相当于NULL, 但是和 NULL 比较的结果还是false。