SQL>
SQL> SET ECHO ON
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
2 a INTEGER;
3 b BOOLEAN;
4 n INTEGER; --this will be our null value.
5 BEGIN
6 a := 2;
7
8 b := (a <> n);
9 IF b THEN
10 DBMS_OUTPUT.PUT_LINE('a <> n is TRUE');
11 ELSIF NOT b THEN
12 DBMS_OUTPUT.PUT_LINE('a <> n is FALSE');
13 ELSE
14 DBMS_OUTPUT.PUT_LINE('a <> n is NULL');
15 END IF;
16 END;
17 /
a <> n is NULL
PL/SQL procedure successfully completed.
SQL>
|