A variable is null if a value hasn't been assigned to it yet : Variable « PL SQL Programming « Oracle PL/SQL Tutorial






SQL>
SQL> SET ECHO ON
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
  2    test  INTEGER;
  3  BEGIN
  4    IF test IS NULL THEN
  5      DBMS_OUTPUT.PUT_LINE('The variable TEST is null.');
  6    END IF;
  7
  8    test := 1;
  9    DBMS_OUTPUT.PUT_LINE('TEST = ' || TO_CHAR(test));
 10
 11    IF test IS NOT NULL THEN
 12      DBMS_OUTPUT.PUT_LINE('The variable TEST is NOT null.');
 13    END IF;
 14  END;
 15  /
The variable TEST is null.
TEST = 1
The variable TEST is NOT null.

PL/SQL procedure successfully completed.

SQL>
SQL>








24.2.Variable
24.2.1.Variables and Types
24.2.2.A variable is null if a value hasn't been assigned to it yet
24.2.3.In SQL statements, the names of database columns take precedence over the names of local variables and formal parameters