测试带参数的静态游标
declare
cursor c(v_ename varchar2) is select * from emp where ename = v_ename;
e emp%rowtype;
begin
open c('KING'); -- 填写的是谁,最后输出的就是谁的信息
loop
fetch c into e;
exit when c%notfound;
dbms_output.put_line(e.empno||' '||e.ename||' '||e.job||' '||e.mgr||' '||e.hiredate||' '||' '||e.sal||' '||' '||e.comm||' '||e.deptno);
end loop;
close c;
end;
版权声明:
作者:k, k
链接:https://kuyour.top/?p=79
来源:KuKey
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
打赏
海报
![](https://kuyour.top/wp-content/uploads/2024/07/微信赞赏码.png)
![](https://kuyour.top/wp-content/uploads/2024/07/支付宝扫码领红包.png)
测试带参数的静态游标
declare
cursor c(v_ename varchar2) is select * from emp where ename = v_ename;
e emp%rowtype;
begin
open c('KING'); -- 填写的是谁,最后输出……
![](https://kuyour.top/wp-content/uploads/2023/04/wordpress-logo.png)
共有 0 条评论