带参数的光标
程序员文章站
2024-02-11 11:18:28
...
--带参数的光标
--查询某个部门中员工的姓名
declare
cursor cemp(dno number) is select ename from emp where deptno=dno;
pename emp.ename%type;
begin
open cemp(20);
loop
fetch cemp into pename;
exit when cemp%notfound;
DBMS_OUTPUT.PUT_LINE(pename);
end loop;
close cemp;
end;
上一篇: Qt 模拟安卓虚拟摇杆实现