A NULL table, and a table with a NULL element.
SQL>
SQL> DECLARE
2 TYPE wordTableType IS TABLE OF VARCHAR2(50);
3
4 myTable1 wordTableType;
5
6 myTable2 wordTableType := wordTableType();
7 BEGIN
8 IF myTable1 IS NULL THEN
9 DBMS_OUTPUT.PUT_LINE('myTable1 is NULL');
10 ELSE
11 DBMS_OUTPUT.PUT_LINE('myTable1 is not NULL');
12 END IF;
13
14 IF myTable2 IS NULL THEN
15 DBMS_OUTPUT.PUT_LINE('myTable2 is NULL');
16 ELSE
17 DBMS_OUTPUT.PUT_LINE('myTable2 is not NULL');
18 END IF;
19 END;
20 /
myTable1 is NULL
myTable2 is not NULL
PL/SQL procedure successfully completed.
SQL>
SQL>
Related examples in the same category