CREATE OR REPLACE PROCEDURE ShowShips3Task(
p_Register IN ship.registry_country%TYPE,
o_name OUT ship.ship_name%TYPE,
o_capitan OUT ship.captain_name%TYPE)
IS
procedure showshipsDisp(
o_cap out Ship.captain_name%type,
o_dis out Ship.displacement%type)
is
begin
Select Captain_name, Displacement
into o_cap, o_dis
from Ship Where Ship_name = 'Avrora';
end;
BEGIN
SELECT Ship_name , Captain_Name
INTO o_name, o_capitan
from Ship WHERE registry_country LIKE p_register || '%';
END;
如何同时在另一个内执行一个程序?
如何创建多值参数,意味着内部的第二个程序依赖于第一个程序的paramatr?
答案 0 :(得分:0)
在问题的示例中,嵌套过程仅被声明但从未被调用过。要运行嵌套过程,必须在BEGIN
和END
语句之间进行调用:
BEGIN
SELECT Ship_name , Captain_Name
INTO o_name, o_capitan
from Ship WHERE registry_country LIKE p_register || '%';
showshipsDisp(o_cap => ?
,o_dis => ?);
END;
问号应替换为适当的变量。