Oracle参数变量类型
-- 定义游标类型 ref cursor 取指定部门的所有员工的姓名和工资declare type cursor_type is ref cursor; v_cursor_test cursor_type; v_ename emp.ename%type; v_sal emp.sal%type;begin open v_cursor_test for select ename, sal from emp where deptno = &no; --循环取出数据并显示 loop fetch v_cursor_test into v_ename, v_sal; exit when v_cursor_test%notfound; dbms_output.put_line('姓名:' || v_ename || ' 工资:' || v_sal); end loop;end;
?