-----------------------------------------------------------------
-- PL/SQL: Programmer-defined record (Section 4.7.3)            -
-- Chapter 4; Oracle Programming -- A Primer                    -
--            by R. Sunderraman                                 -
-----------------------------------------------------------------

DECLARE
  TYPE my_rec_type IS RECORD
    (number integer,
     name varchar2(20));

  r1 my_rec_type;
  r2 my_rec_type;
BEGIN
  r1.number := 111;
  r1.name := 'jones';
  r2 := r1;
  dbms_output.put_line('Number = ' || r2.number ||
                       '  Name = ' || r2.name);
END;
/
