在PL / SQL中调用其他过程内的过程

时间:2015-03-05 10:51:27

标签: oracle plsql nested procedure

我是PL / SQL的新手我需要帮助来解决这个问题 - 我已经编写了2个程序如何在第二个程序中调用第一个程序。这是2个程序。 Porcedure 1:

 create or replace procedure propl1(
 activeplayer player.active_player%type,
 pname out player.player_name%type,
 spl out player.specialization%type, cur out sys_refcursor)
 is begin
 open cur for select player_name, specialization from player p, country c 
 where p.country_id=c.country_id and active_player=activeplayer order by country_name desc;
 end propl1;
 /

过程2:

  create or replace procedure player_runs(
  pname player.player_name%type, 
  runs out score_details.runs_scored%type,
  sixes out score_details.sixes%type)
  is begin
  select runs_scored, sixes into runs, sixes from player p, score_details s
  where p.player_id=s.player_id and player_name=pname;
  end player_runs;
  /

我想在程序2中调用程序1。

1 个答案:

答案 0 :(得分:0)

您可以提供程序名称以及您需要调用其他程序的参数。

e.g。

Begin
   proc_sample(input_param1, input_param2);
end;

/