--表参照无参光标页信息

--注意:红色就是参数

declare

  cursor tt(pkeycode temp.keycode%type) is select name,sal from temp where keycode = pkeycode;

  --定义变量

  vname temp.name%type;

  vsal temp.sal%type;

begin

  open tt(&keycode);

  loop

    fetch tt into vname,vsal;

    exit when tt%notfound;

    dbms.output.put_line(vname || '-------------' || vsal);

  end loop;

  close tt;

end;

/

相关文章:

  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-04-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案