Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> assigning nulls to records

assigning nulls to records

From: Haximus <14356256546_at_spam.org>
Date: Tue, 20 Jan 2004 18:38:18 GMT
Message-ID: <uAePb.192217$X%5.2906@pd7tw2no>


The PL/SQL documentation for 9.2 states that "to set all the fields in a record to null, simply assign to it an uninitialized record of the same type" and gives the following example:

DECLARE
    TYPE EmpRec IS RECORD (

        emp_id    emp.empno%TYPE,
        job_title VARCHAR2(9),
        salary    NUMBER(7,2));
        emp_info EmpRec;
        emp_null EmpRec;

BEGIN
    emp_info.emp_id := 7788;
    emp_info.job_title := 'ANALYST';
    emp_info.salary := 3500;
    emp_info := emp_null;  -- nulls all fields in emp_info
    ...
END; Is it acceptable to set fields in a record to null by assigning null to the record itself? Like:

    emp_info := null;

I tried the syntax and it appears to work, I am just curious if this is actually documented somewhere because I have been unable to find it. Received on Tue Jan 20 2004 - 12:38:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US