我有 3 个功能:-
select function1(param1) from dual;
select function2(param2) from dual;
select function3(param3) from dual;
我想在 1 个包装中使用其中的 3 个。
Create or replace package body PACKAGE_ABC
as procedure proc_abc(param1 varchar,param2 varchar,param3 varchar)
as
cursor cur1
is
select meaning from
table1
where meaning=(select function1(param1) from dual)
cursor cur2
is
select meaning from
table2
where meaning=(select function2(param2) from dual)
cursor cur3
is
select meaning from
table3
where meaning=(select function3(param3) from dual)
Begin
for cursor_var in cur1
loop
fnd_output.put_line(cursor_var.meaning )
end loop;
for cursor_var2 in cur2
loop
fnd_output.put_line(cursor_var2.meaning )
end loop;
for cursor_var3 in cur3
loop
fnd_output.put_line(cursor_var3.meaning )
end loop;
end proc_abc;
end package_abc;
无论如何,我可以在一个 for 循环中使用 3 个 funcns ...... 3 个游标选择语句使用同一个表,但正在获取差异值