NULL 不 大于/小于/等于/不等于 任何值(包括NULL本身),有且仅有:NULL IS NULL
SQL> set serveroutput on SQL> SQL> BEGIN 2 IF (2 > NULL) 3 THEN 4 dbms_output.put_line('>'); 5 ELSIF (2 < NULL) 6 THEN 7 dbms_output.put_line('<'); 8 ELSIF (2 = NULL) 9 THEN 10 dbms_output.put_line('='); 11 ELSIF (2 != NULL) 12 THEN 13 dbms_output.put_line('!='); 14 ELSE 15 dbms_output.put_line('Unknown!'); 16 END IF; 17 18 IF (NULL = NULL) 19 THEN 20 dbms_output.put_line('NULL = NULL'); 21 ELSIF (NULL != NULL) 22 THEN 23 dbms_output.put_line('NULL != NULL'); 24 ELSIF (NULL IS NULL) 25 THEN 26 dbms_output.put_line('NULL IS NULL'); 27 ELSE 28 dbms_output.put_line('UNKNOWN!!'); 29 END IF; 30 END; 31 / Unknown! NULL IS NULL PL/SQL procedure successfully completed SQL>