pl/sql学习7——pl/sql记录表

来源:互联网 发布:淘宝天猫评价采集 编辑:程序博客网 时间:2024/06/05 07:35
是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;


 

原创粉丝点击