是pl/sql记录于pl/sql表的结合体,支持多行多列,通过下标来取数据
declare
type dept_table_type is table of dept%rowtype index by binary_integer;
v_dept dept_table_type;
begin
select * into v_dept(1) from dept where rownum = 1;
dbms_output.put_line('部门编号:' || v_dept(1).deptno);
dbms_output.put_line('部门名称:' || v_dept(1).dname);
dbms_output.put_line('部门地址:' || v_dept(1).loc);
end;