Index | Home | Forums
Oracle PL/SQL Example 5-49 Using SELECT INTO to Assign Values in a Record

Example 5-49 Using SELECT INTO to Assign Values in a Record

DECLARE
   TYPE RecordTyp IS RECORD (last employees.last_name%TYPE, 
                             id employees.employee_id%TYPE);
   rec1 RecordTyp;
BEGIN
   SELECT last_name, employee_id INTO rec1 FROM employees WHERE ROWNUM < 2;
   DBMS_OUTPUT.PUT_LINE('Employee #' || rec1.id || ' = ' || rec1.last);
END;
/

This page was created by oracleabc.com on Feb 23,2008 00:09:02
General comments and questions regarding this document should be sent by email to info@oracleabc.com or post your comments here