Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> assigning nulls to records
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;
emp_info.emp_id := 7788; emp_info.job_title := 'ANALYST'; emp_info.salary := 3500; emp_info := emp_null; -- nulls all fields in emp_info...
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