NULL objects and NULL attributes : Object Instance « Object Oriented « Oracle PL/SQL Tutorial






SQL>
SQL> CREATE OR REPLACE TYPE address AS OBJECT
  2              (line1 VARCHAR2(20),
  3               line2 VARCHAR2(20),
  4               city VARCHAR2(20),
  5               state_code VARCHAR2(2),
  6               zip VARCHAR2(13));
  7  /

Type created.

SQL> DECLARE
  2    addressValue address;
  3  BEGIN
  4
  5    addressValue := address('27 Rd','#99','E','NJ','08820');
  6    addressValue := NULL;
  7    IF (addressValue IS NULL) THEN
  8      DBMS_OUTPUT.PUT_LINE('addressValue is atomically null');
  9    END IF;
 10  END;
 11  /
addressValue is atomically null

PL/SQL procedure successfully completed.

SQL>








32.6.Object Instance
32.6.1.NULL objects and NULL attributes
32.6.2.Check nullment for object instance
32.6.3.Invoking a method
32.6.4.Call User-defined constructors